Jump to content

simple preg-replace


johnsmith153

Recommended Posts

This solution isn't using regular expressions, but I think it might be quicker. If you are sure that you will have that pattern you showed above you can do this:

 

$pos = strpos($yourString, ' ');
if($pos !== false){
$yourNewString = substr($yourString, $pos + 1);
}

Link to comment
https://forums.phpfreaks.com/topic/224999-simple-preg-replace/#findComment-1162116
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.