SetEnv Posted December 7, 2008 Posted December 7, 2008 (edited) Hello, I'm not really familiar with regexp,but i'm trying to create a "IsIp" Function. This function just need to verify if the item is like *.*.*.* and if ip is correct (1.1.1.1 -> 254.254.254.254) Here is my first try, but I don't know if the regexp is correct. If someone expert with this could help me, it will be nice ! Thanks in advance =) Func Isip($xisip) ;this Function isn't yet created. Local $IsipSplit = StringSplit($xisip, "."), $IsIpCnt = $IsipSplit[0] If $IsIpCnt <> "4" Then Return "False" If $IsIpCnt == "4" Then While $IsIpCnt > "0" $xisiptemp = StringRegExp($IsipSplit[$IsIpCnt],'1-254') If $xisiptemp <> 1 Then Return "False" $IsIpCnt -= 1 WEnd Return "True" EndIf EndFunc ; ==> EndFunc 'Isip($xisip)' Edited December 7, 2008 by SetEnv
Josbe Posted December 7, 2008 Posted December 7, 2008 Maybe you could get something from this. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
SetEnv Posted December 7, 2008 Author Posted December 7, 2008 Yep that's it! I searched trough the help file but didn't find anythig... Thanks ! :-D
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now