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:
[OT] Server check please (2006)
FYI: Store / Dealer locators & Location-based searches (2001)
WebCatalog/WebMerchant 3.0 for SALE !!! (2000)
AAAH: stupid sendmail (2001)
Setting up WebCatalog with Retail Pro data (1996)
WebCat2: Items xx to xx shown, etc. (1997)
Help! WebCat2 bug (1997)
WebCat virtual postcard is done! Thanks for the help! (1998)
Problems with cybercash (2000)
WebCat2: Formulas.db question (1997)
WC2.0 Memory Requirements (1997)
Calculating multiple shipping... (1997)
Date Bug (1998)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
unable to launch acgi in WebCat (1997)
Re(4): & in grep (2003)
WebCat2b13MacPlugIn - More limits on [include] (1997)
Is Webcatalog 2.1 NT Ready? (1998)
RE: Purchased cart being overwritten (1997)
A little syntax help (1997)