Jump to content

Recommended Posts

Is it possible to code a conditional statement using an IP scope ? Example:

IF IP Address = 10.165.5.XX then

Do something

Can @IPaddress1 be used or will it have to be done differently ? And if differently I'm after a suggestion !!


Link to post
Share on other sites

Regular Expressions.

This works for me:

#include <Array.au3>
Global $result = StringRegExp("", "10.165.5.d+.d+", 1)
Link to post
Share on other sites

Keep in mind, that the dot has a special meaning in regular expressions (any character), so you should use .

StringRegExp("", "^12.13.14.d{1,3}$", 1)


^ - Match beginning of string

12 - Match characters 1 and 2

. - Match a dot

13 - Match 13

. - dot

14 - 14

. - dot

d{1,3} - match specific amount of digits: at least one, at most three

$ - Match end of string

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...