On Mo, 2010-03-22 Summer wrote:

> Hello All,
>   
...

> Cart : Red Blouse:   Size :Green
> 
> should be:
> 
> Cart: Red Blouse: Size: Green  

> replace("(?i:\:\s+)",": ")
> replace("(?i:\s+\:)",":")  

> or  

> replace("(\s+\:\s+)",": ")
> 
> look right?
>   

Try the pattern "\s*:\s*", parentheses not needed and with "+" you
are looking for one or more so your last pattern only matches
something like "Size : green". Both your solutions did not handle the
case "Size:Green".

And you should try to do it on the other side as Randall mentioned ...

Just curious: is blue smaller than green?

Matthias

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to