Re: [WebDNA] Formatting text
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 107194
interpreted = N
texte = To match parentheses, you need to escape them using a \, i.e. \(Text1\).Here's one way to try if you always have at least two numbers in thematch series:[grep search=([0-9][0-9][0-9]*) \(Text1\)&replace=\1]456678 (Text1)33467 (Text1)[/grep] (Text 1)This goes ahead and removes the (Text1) and inserts it at the end.BillOn Wed, Aug 10, 2011 at 10:32 AM,
wrote:> Hello,>> I have some text as such>> 456678 (Text1) 33467 (Text1)>> I am unsure how to make this turn into>> 456678 33467 (Text1)>> I've tried with Grep, but that just removes the Text1, and leaves the ()> and I only need to remove the first instance of the Text1>> [Grep search=((Text1))&replace=]456678 (Text1) 33467 (Text1)[/Grep]>> This just gives> 456678 () 33467 ()>> Then I tried matching the (), but I couldnt figure out how to do that, I> don't use regex alot, and even less webdna grep.>> I figured if I could remove the Text1 and then the ()>> I could add my (Text1) when I was done processing it.>> Does anyone have any other ideas?>> The text could end up as 456678 (Text1) 33467 (Text1) 48789 (Text1) as> well, with arbitarily long occurances of text, but always with the same> format>> number (text) number (text)>> /Tommy>>>>>>> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us>
Associated Messages, from the most recent to the oldest:
To match parentheses, you need to escape them using a \, i.e. \(Text1\).Here's one way to try if you always have at least two numbers in thematch series:[grep search=([0-9][0-9][0-9]*) \(Text1\)&replace=\1]456678 (Text1)33467 (Text1)[/grep] (Text 1)This goes ahead and removes the (Text1) and inserts it at the end.BillOn Wed, Aug 10, 2011 at 10:32 AM, wrote:> Hello,>> I have some text as such>> 456678 (Text1) 33467 (Text1)>> I am unsure how to make this turn into>> 456678 33467 (Text1)>> I've tried with Grep, but that just removes the Text1, and leaves the ()> and I only need to remove the first instance of the Text1>> [Grep search=((Text1))&replace=]456678 (Text1) 33467 (Text1)[/Grep]>> This just gives> 456678 () 33467 ()>> Then I tried matching the (), but I couldnt figure out how to do that, I> don't use regex alot, and even less webdna grep.>> I figured if I could remove the Text1 and then the ()>> I could add my (Text1) when I was done processing it.>> Does anyone have any other ideas?>> The text could end up as 456678 (Text1) 33467 (Text1) 48789 (Text1) as> well, with arbitarily long occurances of text, but always with the same> format>> number (text) number (text)>> /Tommy>>>>>>> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us>
William DeVaul
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[SearchString] problem with [search] context (1997)
encryption in browser? (1998)
[SHOWIF AND/OR] (1997)
Multiple Newcarts (1996)
Replace/Commit not Replacing/Commiting (2000)
Undeclared variables (2004)
Q: for those who use Cookies for sessions? (2004)
[WebDNA] Email time bug? YES, it's a bug! (2011)
Anomaly ? causes NT application event log to overflow (1997)
Web Catalog vs. ICAT (1997)
Database Program (1997)
Re[2]: 2nd WebCatalog2 Feature Request (1996)
WebCatalog for guestbook ? (1997)
Mac System Experience (1998)
Error:Too many nested [xxx] contexts (1997)
Multiple transactions per cart (2000)
[WebDNA] Math Date issue (2009)
[searchString] (1997)
Wrapping text (1998)
Bug or syntax error on my part? (1997)