|
Posted by Toby A Inkster on 04/10/07 11:46
Ben wrote:
> Is there a way, shoer of processing the strings to turn all commas
> into spaces beforehand?
Wouldn't a better conversion be from a comma to "comma-space".
In PHP, this would be:
$text = str_replace(',', ', ', $text);
or even better:
$text = preg_replace('/\,([^\s])/', ', $1', $text);
Anyone know if Internet Exploder supports ZWSP yet?
$text = preg_replace('/\,([^\s])/', ',​$1', $text);
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
[Back to original message]
|