Re: SM: Grep Syntax?
This WebDNA talk-list message is from 2005
It keeps the original formatting.
numero = 62780
interpreted = N
texte = The plus would require at least one, but the grep in webdna does not support that syntax. Instead of using + to require at least one, I just repeat the pattern with one plus zero or more.-----Original Message-----From: Clint Davis
Sent: Wed, 10 Aug 2005 12:57:05 -0500To: "WebDNA Talk" Subject: Re: SM: Grep Syntax?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/-------------------------------------------------------------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:
The plus would require at least one, but the grep in webdna does not support that syntax. Instead of using + to require at least one, I just repeat the pattern with one plus zero or more.-----Original Message-----From: Clint Davis Sent: Wed, 10 Aug 2005 12:57:05 -0500To: "WebDNA Talk" Subject: Re: SM: Grep Syntax?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/-------------------------------------------------------------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/
devaulw@onebox.com
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:
splitting numbers in webDNA? (1997)
HELP WITH DATES (1997)
Using Cookie for client specific info? (1997)
CC and Europe (1999)
Many $WebCat.exe processes (1998)
using showpage and showcart commands (1996)
Sort Order on a page search (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
[WebDNA] Sendmail with attachment (2019)
[WebDNA] WebDNA code displaying on page (2012)
apostrophe in search item (1997)
How does the Globals folder work? (2000)
Field lenght (1998)
Multiple 'Users.db' files not possible (1997)
Adding muliple sku + quantities (1999)
Date search - yes or no (1997)
ListFiles and NT Email Sender 3rd Request (2000)
writefile and texte (1997)
WebCat2b13MacPlugin - [math][date][/math] problem (1997)
WebCat editing, SiteGuard & SiteEdit (1997)