tempman Posted April 3, 2014 Posted April 3, 2014 ; os.txt ;| IP | OS | ;--------------------------- ;| 10.0.1.21 | Windows | ;| 10.0.1.22 | Windows 8 | ;| 10.0.1.23 | Windows 8 | ;| 10.0.1.24 | Windows | ;| 10.0.1.25 | Windows | ;| 10.0.1.26 | Windows 8 | #include <Array.au3> Local $os = "os.txt" Local $answer = StringRegExp(FileRead($os), '(?m)^.*Windows.*$', 3) _ArrayDisplay($answer) Hi, I need to display in array only lines that contains Windows, not Windows 8.
butterfly Posted April 3, 2014 Posted April 3, 2014 Local $answer = StringRegExp(FileRead($os), 'Windows\s[^8]', 3) Should work in this case but it is not very resilient you can also check your code here (although i am not sure if it is 100% compatible)
tempman Posted April 3, 2014 Author Posted April 3, 2014 (edited) My response shou be: | 10.0.1.21 | Windows | | 10.0.1.24 | Windows | | 10.0.1.25 | Windows | Edited April 3, 2014 by tempman
Solution FireFox Posted April 3, 2014 Solution Posted April 3, 2014 Why don't you stick to your previous thread? Local $answer = StringRegExp(FileRead($os), '(?m)^.*Windows\s[^\d].*$', 3)
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