Regular expressions in PHP - a problem
Posted: Wed Jan 28, 2009 10:36 pm
Hi,
Im new to PHP and regular expressions and Ive been having a lot of trouble with a particular case.
My problem is that I need to search for a regular expression in a string and replace a part of the match found. To be specific, I need to replace commas in a string, if and only if, they occur within alphabets but I do not want to replace commas between numbers (like 100,000). How can I solve this problem with regular expressions?
Using preg_replace, Im not able to do this. Is there a function which can help me with this? Can anyone guide me please?
Im new to PHP and regular expressions and Ive been having a lot of trouble with a particular case.
My problem is that I need to search for a regular expression in a string and replace a part of the match found. To be specific, I need to replace commas in a string, if and only if, they occur within alphabets but I do not want to replace commas between numbers (like 100,000). How can I solve this problem with regular expressions?
Using preg_replace, Im not able to do this. Is there a function which can help me with this? Can anyone guide me please?