You are here:  » Search and replace numbers to text

Support Forum



Search and replace numbers to text

Submitted by marco on Wed, 2008-02-06 11:02 in

Hello,

I have implemented the tagging system (node1171) which works great. The problem is that i have a feed which contains category numbers instead of text. So the tag looks like: "1,91,125". When i do a search and replace for "1" (or even "1,") it goes all wrong because also the "1" in "91" and "125" are replaced by the text.
How do i apply the search and replace only to match the exact numbers?

Thanks

Submitted by support on Wed, 2008-02-06 11:34

Hi Marco,

I would suggest perhaps modifying the tag code to include spaces around each tag element, so rather than constructing "1,91,125" you get " 1 , 91 , 125 ". Then, you can use Search & Replace on the number plus the spaces, e.g. " 1 ", which should work.

An alternative would be to search and replace "," with " , " before your numeric search and replace filters which might be a better alternative...

Cheers,
David.