therks Posted January 25, 2005 Share 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 Link to comment Share on other sites More sharing options...
SlimShady Posted January 25, 2005 Author Share 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 Link to comment Share on other sites More sharing options...
SlimShady Posted January 26, 2005 Author Share Posted January 26, 2005 *bump* Link to comment Share on other sites More sharing options...
therks Posted January 27, 2005 Share 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 Link to comment Share on other sites More sharing options...
SlimShady Posted January 27, 2005 Author Share 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. Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 27, 2005 Administrators Share 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. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ 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