RobinTibbs Posted February 2, 2007 Share Posted February 2, 2007 since i am perhaps totally suicidal or w/e im copying/pastin user agent strings from a website and using them to test my detection methods. however when i copy and past the lines, theres always a * (since i'm copying from a list). what i want to do is read in a text file containing these pasted strings (already know how to do this) then strip the * and any whitespace is this possible? many thanks Quote Link to comment Share on other sites More sharing options...
effigy Posted February 2, 2007 Share Posted February 2, 2007 $data = preg_replace('/[*\s]/', '', $data); Quote Link to comment Share on other sites More sharing options...
RobinTibbs Posted February 2, 2007 Author Share Posted February 2, 2007 you must live and breathe regex thank you once again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.