Dracil Posted December 28, 2009 Share Posted December 28, 2009 Ok ive been searching around, i dunno maybe i just dont know what to search for, but i simply cant find it =/ sorry for asking tho. But i must know Ok i have a : $mystring = "$Mego de" What i need is something that remove certain letters, here i need to remove the letter "$" and " "(space). Any tips/gudielines or actual code anyone could provide? Thanks Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 28, 2009 Share Posted December 28, 2009 StringReplace could do it. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Lococobra Posted December 28, 2009 Share Posted December 28, 2009 You can do this in one command, and even add more matching characters if you need to. $mystring = StringRegExpReplace($mystring, '[$\s]', '') Note that the \s means ANY whitespace character (Horizontal Tab, Line Feed, Vertical Tab, Form Feed, Carriage Return, and the standard space) if you would rather just match the space character then replace \s with a space. Link to comment Share on other sites More sharing options...
AlmarM Posted December 28, 2009 Share Posted December 28, 2009 If you a are curious, take a look at my "_StringStripChar" in my sig. Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Lococobra Posted December 28, 2009 Share Posted December 28, 2009 No offense, but regular expressions win any day of the week 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