This content has been marked as final.
Show 4 replies
-
1. Re: Regular Expressions
insuractive Jan 22, 2009 11:14 AM (in response to kodemonki)Try matching your expressions in the replace string using a "\" instead of a "$":
rereplace(my_cell,',"\$(\d*),(\d*),(\d*),(\d*.\d*)"|,"\$(\d*),(\d*),(\d*.\d*)"|,"\$(\d*),( \d*.\d*)"|,\$(\d*.\d*)', ',\1\2\3\4\5\6\7\8\9\10','ALL') -
2. Re: Regular Expressions
kodemonki Jan 22, 2009 11:20 AM (in response to kodemonki)That works much better, thank you! -
3. Re: Regular Expressions
Newsgroup_User Jan 22, 2009 11:41 AM (in response to kodemonki)On Thu, 22 Jan 2009 17:34:02 +0000 (UTC), kodemonki wrote:
> I'm trying to take out surrounding quotes and 1000s seperators from numbers 0
> to just under one trillion. In DW I can search for
>
> ,"\$(\d*),(\d*),(\d*),(\d*.\d*)"|,"\$(\d*),(\d*),(\d*.\d*)"|,"\$(\d*),(\d*.\d*)"
Why don't you just use [",] as your match string, and replace it with ""?
Or am I misreading your requirements here?
Regarding your original problem... did it occur to you to read the docs?
http://livedocs.adobe.com/coldfusion/8/regexp_01.html
When stuck... RTFM is always a really good place to start.
--
Adam -
4. Re: Regular Expressions
kodemonki Jan 22, 2009 12:16 PM (in response to kodemonki)You're right. http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=regexp_10.html is a good start. The documentation I read was here: http://www.adobe.com/devnet/dreamweaver/articles/regular_expressions_07.html admittedly for DW, not CF.
I can't replace all the commas because it's a .csv file. Actually, I'm not entirely sure that's what [",] means. Excel surrounds fields having commas in them with double quotes, so I'm trying to pull out the commas as well as the quotes.
That and I thought it'd be good practice.


