Phantom-a Posted April 25, 2008 Share Posted April 25, 2008 How can I match the line of Numbers on this, to replace it in the next needle? THe problem is the numbers are random and always 5 characters long. $html = str_replace('example.css?93602','myexample',$html); Quote Link to comment Share on other sites More sharing options...
micah1701 Posted April 25, 2008 Share Posted April 25, 2008 for starters, you probably wanna use ereg_replace() or preg_replace() if you're using regex. Quote Link to comment Share on other sites More sharing options...
Phantom-a Posted April 25, 2008 Author Share Posted April 25, 2008 I thought so too. Anymore help? $html = preg_replace('example.css?29229','myexample',$html); Quote Link to comment Share on other sites More sharing options...
Phantom-a Posted April 25, 2008 Author Share Posted April 25, 2008 I found this. Looks like something I need. Not sure how to modify this to work? How about this , $numbers = "/[^0-9_]/i"; $html = preg_replace('example.css?.'$numbers',.proxifyURL('http://static.ak.fbcdn.net/css/ie6.css?.'$numbers'),$html); Quote Link to comment Share on other sites More sharing options...
effigy Posted April 25, 2008 Share Posted April 25, 2008 preg_replace('/example\.css\?\d{5}/', 'replacement', $data); 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.