gcue Posted March 12, 2010 Author Posted March 12, 2010 hmm doesnt work for me... i did notice a typo ("$RegExpReplace" to "StringRegExpReplace") in your last entry - fixed it - but still doesnt work...
Xenobiologist Posted March 12, 2010 Posted March 12, 2010 Hey, can you summarize your problem? The string and how does your result need to look like? Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
gcue Posted March 12, 2010 Author Posted March 12, 2010 here is the stringLast Intruder Address:TCP/IP Network AddressIP Address: 30.20.212.274Maximum Connections: 6Login Script:map k:=lo-ncs_usrs2_server\usrs2:@NET USE x: \\loap01\tmsLogin Time: 05:09:48 am 03/11/10modifiersName: CN=CGNDSDR1Network Address:TCP/IP Network AddressIP Address: 30.20.12.14i am trying to grab "IP Address" value for Last Intruder Addressi am also trying to grab IP Address value for Network Address (which i think should look similar)
Xenobiologist Posted March 12, 2010 Posted March 12, 2010 (edited) $str = 'Last Intruder Address:' & @CRLF & _ 'TCP/IP Network Address' & @CRLF & _ 'IP Address: 30.20.212.274' & @CRLF & _ 'Maximum Connections: 6' & @CRLF & _ 'Login Script:' & @CRLF & _ 'map k:=lo-ncs_usrs2_server\usrs2:' & @CRLF & _ @CRLF & _ '@NET USE x: \\loap01\tms' & @CRLF & _ 'Login Time: 05:09:48 am 03/11/10' & @CRLF & _ 'modifiersName: CN=CGNDSDR1' & @CRLF & _ 'Network Address:' & @CRLF & _ 'TCP/IP Network Address' & @CRLF & _ 'IP Address: 30.20.12.14' $re = StringRegExp($str , 'IP Address: ([\d\.]+)', 3) _ArrayDisplay($re) Edited March 12, 2010 by Xenobiologist Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
gcue Posted March 12, 2010 Author Posted March 12, 2010 very cool but i definitely want to make sure i grab the right one.. unfortunately, sometimes the fields are missing or out of order so id definitely want to grab IP Address under "Last Intruder Address" and IP Address under "Network Address" thanks for your help!
Xenobiologist Posted March 12, 2010 Posted March 12, 2010 $str = 'Last Intruder Address:' & @CRLF & _ 'TCP/IP Network Address' & @CRLF & _ 'IP Address: 30.20.212.274' & @CRLF & _ 'Maximum Connections: 6' & @CRLF & _ 'Login Script:' & @CRLF & _ 'map k:=lo-ncs_usrs2_server\usrs2:' & @CRLF & _ @CRLF & _ '@NET USE x: \\loap01\tms' & @CRLF & _ 'Login Time: 05:09:48 am 03/11/10' & @CRLF & _ 'modifiersName: CN=CGNDSDR1' & @CRLF & _ 'Network Address:' & @CRLF & _ 'TCP/IP Network Address' & @CRLF & _ 'IP Address: 30.20.12.14' $re = StringRegExp($str, '(?s)Last Intruder Address:.*?TCP/IP Network Address.*?([\d\.]+)', 3) _ArrayDisplay($re) $re1 = StringRegExp($str, '(?s)Network Address.*?TCP/IP Network Address.*?([\d\.]+)', 3) _ArrayDisplay($re1) Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Xenobiologist Posted March 12, 2010 Posted March 12, 2010 perfect!!!!many many thanks xenoNo problem. Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
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