therks Posted January 25, 2005 Posted January 25, 2005 (edited) Oh believe me, I did. And once you get a replace function working for RegEx's I'll be very happy. I wish PHP had implemented this type of functionality in their regex's. I have to do patterns like "\[b\][^\[]+\[/b\]" to do something like what your pattern does with this "\[b\].+?\[/b\]". Edited January 25, 2005 by Saunders My AutoIt Stuff | My Github
SlimShady Posted January 25, 2005 Author Posted January 25, 2005 I have a list of invalid chars and it should not match them.These are the chars:/ < > ? [ ]: | *Why does the following fail?$sFolder = "\Program Files\AutoIt3" StringRegExp($sFolder, '[^/<>\?\[\]:|\*]{' & StringLen($sFolder) & '}') If @Extended Then MsgBox(64, "Test", "Successful!") Else MsgBox(64, "Test", "Failure!") EndIf
therks Posted January 27, 2005 Posted January 27, 2005 As near as I can figure out, the pattern isn't escapeing the closebracket you have, so it's not working properly. Cus if you change the pattern to take out the \] it returns fine.$sFolder = "\Program Files\AutoIt3" StringRegExp($sFolder, '[^/<>\?\[:|\*]{' & StringLen($sFolder) & '}') If @Extended Then MsgBox(64, "Test", "Successful!") Else MsgBox(64, "Test", "Failure!") EndIfAnother bug I guess. My AutoIt Stuff | My Github
SlimShady Posted January 27, 2005 Author Posted January 27, 2005 I knew it. I tried alot of variations with that pattern and it kept failing.I can leave \] out for now, until it's fixed.
Administrators Jon Posted January 27, 2005 Administrators Posted January 27, 2005 PLease post a bug report in the other forum, if Nutster is anything like me when busy he will just skim read the general support threads.
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