supadodger Posted October 1, 2010 Posted October 1, 2010 If Not StringRegExp($author[0], "[^ a-zA-Z0-9_\-]") Then StringRegExpReplace ($author[0],[b]"BLAH BLAH BLAH"[/b],"") EndIf where it says blah blah blah is what i dont know what to put. i need it to replace everything other than a-z 0-9 _ & - ascii characters all that...
supadodger Posted October 1, 2010 Author Posted October 1, 2010 (edited) i did a work around... i put all the special characters in a text file then used filereadtoarray to replace each of them... Dim $replace _FileReadToArray("StringReplace.txt", $replace) $po = 0 Do $po = 1 + 1 $URLS[$x] = StringReplace($URLS[$x], $replace[$po], "") Until $po = $replace[0] Edited October 1, 2010 by supadodger
dwerf Posted October 1, 2010 Posted October 1, 2010 (edited) Dim $author[1] = ['q+w#er-ty ***abc'] $author[0] = StringRegExpReplace($author[0], '[^ a-zA-Z0-9_\-]', '') MsgBox(0, '', $author[0]);qwer-ty abc Edited October 1, 2010 by dwerf
UEZ Posted October 1, 2010 Posted October 1, 2010 That will probably not work as you want because $po = 1 + 1 is $po = 2 and will not increase $po! You can use $po += 1 instead. Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
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