Re: SM: Grep Syntax?
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 62779
interpreted = N
texte = Your code worked, but I don't understand exactly why. What is the purpose ofmultiple [a-z] patterns?This does not work:[grep search=([a-z]+)([0-9]+)([a-z]+)&replace=\2]abc567xyz[/grep]On 8/9/05 7:50 PM, "William DeVaul"
wrote:> I think the asterisk is for zero or more. You need to use the> conventional '+' for one or more but the grep in WebDNA has no support> for that. The workaround is to use> > [grep > search=([a-z][a-z]*)([0-9][0-9]*)([a-z][a-z]*)&replace=\2]abc567xyz[/> grep]> > > > On Aug 9, 2005, at 8:22 PM, Clint Davis wrote:> >> Are multiple patterns allowed in a [grep] search? If so, what is the>> syntax?>> I have tried the following with 6.0a/MacOS X with no success:>> >> [grep search=([a-z]*)([0-9]*)([a-z]*)&replace=\2]abc567xyz[/grep]>> >> Should return: 567-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Your code worked, but I don't understand exactly why. What is the purpose ofmultiple [a-z] patterns?This does not work:[grep search=([a-z]+)([0-9]+)([a-z]+)&replace=\2]abc567xyz[/grep]On 8/9/05 7:50 PM, "William DeVaul" wrote:> I think the asterisk is for zero or more. You need to use the> conventional '+' for one or more but the grep in WebDNA has no support> for that. The workaround is to use> > [grep > search=([a-z][a-z]*)([0-9][0-9]*)([a-z][a-z]*)&replace=\2]abc567xyz[/> grep]> > > > On Aug 9, 2005, at 8:22 PM, Clint Davis wrote:> >> Are multiple patterns allowed in a [grep] search? If so, what is the>> syntax?>> I have tried the following with 6.0a/MacOS X with no success:>> >> [grep search=([a-z]*)([0-9]*)([a-z]*)&replace=\2]abc567xyz[/grep]>> >> Should return: 567-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Clint Davis
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:
Setting up the server (1997)
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
Location of Webcat site in folder hierarchy (1997)
Cookies (1999)
Upgrading old WebCat Database Files (1997)
[taxRate] [TaxTotal] ? (1997)
Reversing [ipaddress] normalization (1998)
PIXO support (1997)
Mozilla/4. and Browser Info.txt (1997)
Likelihood of a duplicate (2005)
[WebDNA] Dynamic server feedback? (2009)
Exclamation point (1997)
Have no fear of WebCatalog Builder..... (2000)
orderfile and setlineitems (1998)
9 digit zip (2002)
WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997)
WC1.6 to WC2 date formatting (1997)
Search in 2 or more catalogs (1997)
Re:Emailer and encryption (1997)
Dark Horse Comics success story (1997)