Skampp Posted October 25, 2014 Share Posted October 25, 2014 Dear Community, I am attempting to search for particular lines that begin with a square bracket, such as: [19:05:23] Frankie Say Relax But of course this is not working... If $c > 1 And StringRegExp($fArray[$x], '[') = 1 Then ...do stuff Any ideas what is the proper way? Thanks in advance! Link to comment Share on other sites More sharing options...
kylomas Posted October 26, 2014 Share Posted October 26, 2014 Skampp, Try it like this. If that does not work, post a reproducer that runs (or your whole script)... If $c > 1 And StringRegExp($fArray[$x], '\[') Then ...do stuff kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
mikell Posted October 26, 2014 Share Posted October 26, 2014 (edited) "lines that begin with a square bracket" ... why not If StringLeft($fArray[$x], 1) = '[' Then ... Edited October 26, 2014 by mikell Link to comment Share on other sites More sharing options...
Spider001 Posted October 26, 2014 Share Posted October 26, 2014 just a question not a solution why not to use StringInStr thank you Link to comment Share on other sites More sharing options...
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