Jump to content

[SOLVED] preg_replace until space


sarathi

Recommended Posts

Use this pattern

 

'/\$(.*?)\s$/';

 

Here's something for some reading up

 

http://www.regular-expressions.info/anchors.html

 

The $ normally signifies the end of a string, so you have to escape it when you want to use it as an alphanumeric character

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.