RE: [WebDNA] ONLY the FIRST continuous run of numeric chars?
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 101236
interpreted = N
texte = Ha ha. I just mean it would be nice to know what tags use universalstandards for their params. It would make it easier for pseudo-programmerslike myself to find out what capabilities we have within WebDNA.-----Original Message-----From: Matthew Bohne [mailto:matthew.bohne@benetela.com] Sent: Tuesday, October 21, 2008 3:32 PMTo: talk@webdna.usSubject: Re: [WebDNA] ONLY the FIRST continuous run of numeric chars?Grep, in plain english? The *nix admins can't allow that.Michael A. DeLorenzo wrote:> Did I miss this somewhere in the docs in plain English? I thought we were> mostly limited to the commands, params, etc. in the WebDNA programmer> guide......>> I have now seen the light.>>> -----Original Message-----> From: Matthew Bohne [mailto:matthew.bohne@benetela.com] > Sent: Tuesday, October 21, 2008 1:59 PM> To: talk@webdna.us> Subject: Re: [WebDNA] ONLY the FIRST continuous run of numeric chars?>> The O'Reilly Pocket Guide for Regular Expressions is a handy reference > in these situations.>> [^0-9]* - any character except a number followed by one or more of the > same character> ([0-9][0-9]*) - two or more numbers followed by one or more of the same > character.> - The parenthesis mark it for the \1 in the replace statement.> .* - Any character (except line breaks) followed by one or more of the > same character> | - OR> .* - Any character (except line breaks) followed by one or more of the > same character.>> It then replaces it with whatever was found in the parenthetical set. > If no number strings were found by themselves, it returns blank.>>>> Govinda wrote:> >> Perfect!!>>>> When I saw Grant was writing [grep] for v.4 I remember thinking, "if >> he and we get this right, then we'll forget many other tags as this >> can solve so many things.">> I suppose both side are still aiming for that. ;-)>> In that spirit, Bill can you explain this last [grep] search param you >> wrote in english? What is the logic?>> I get the first two parts, i.e.:>> -any number of non-numeric chars, followed by>> -at least one numeric char, followed by>> ((now here is where it is not clear to me))>> ? - any number of any chars, followed by>> ? - a pipe, followed by>> ? - any number of any chars>>>> why does this do the job?>>>> On Oct 21, 2008, at 2:32 AM, William DeVaul wrote:>>>> >>> [grep search=[^0-9]*([0-9][0-9]*).*|.*&replace=\1][myString][/grep]>>>>>> This will work to ignore the case where no number is in the string.>>> It will return an apartment number if there is no street number.>>>>>> >> --------------------------------------------------------->> 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>> old archives: http://dev.webdna.us/TalkListArchive/>>>>>> >> ---------------------------------------------------------> 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> old archives: http://dev.webdna.us/TalkListArchive/>>> ---------------------------------------------------------> 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> old archives: http://dev.webdna.us/TalkListArchive/>>> ---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usold archives: http://dev.webdna.us/TalkListArchive/
Associated Messages, from the most recent to the oldest:
Ha ha. I just mean it would be nice to know what tags use universalstandards for their params. It would make it easier for pseudo-programmerslike myself to find out what capabilities we have within WebDNA.-----Original Message-----From: Matthew Bohne [mailto:matthew.bohne@benetela.com] Sent: Tuesday, October 21, 2008 3:32 PMTo: talk@webdna.usSubject: Re: [WebDNA] ONLY the FIRST continuous run of numeric chars?Grep, in plain english? The *nix admins can't allow that.Michael A. DeLorenzo wrote:> Did I miss this somewhere in the docs in plain English? I thought we were> mostly limited to the commands, params, etc. in the WebDNA programmer> guide......>> I have now seen the light.>>> -----Original Message-----> From: Matthew Bohne [mailto:matthew.bohne@benetela.com] > Sent: Tuesday, October 21, 2008 1:59 PM> To: talk@webdna.us> Subject: Re: [WebDNA] ONLY the FIRST continuous run of numeric chars?>> The O'Reilly Pocket Guide for Regular Expressions is a handy reference > in these situations.>> [^0-9]* - any character except a number followed by one or more of the > same character> ([0-9][0-9]*) - two or more numbers followed by one or more of the same > character.> - The parenthesis mark it for the \1 in the replace statement.> .* - Any character (except line breaks) followed by one or more of the > same character> | - OR> .* - Any character (except line breaks) followed by one or more of the > same character.>> It then replaces it with whatever was found in the parenthetical set. > If no number strings were found by themselves, it returns blank.>>>> Govinda wrote:> >> Perfect!!>>>> When I saw Grant was writing [grep] for v.4 I remember thinking, "if >> he and we get this right, then we'll forget many other tags as this >> can solve so many things.">> I suppose both side are still aiming for that. ;-)>> In that spirit, Bill can you explain this last [grep] search param you >> wrote in english? What is the logic?>> I get the first two parts, i.e.:>> -any number of non-numeric chars, followed by>> -at least one numeric char, followed by>> ((now here is where it is not clear to me))>> ? - any number of any chars, followed by>> ? - a pipe, followed by>> ? - any number of any chars>>>> why does this do the job?>>>> On Oct 21, 2008, at 2:32 AM, William DeVaul wrote:>>>> >>> [grep search=[^0-9]*([0-9][0-9]*).*|.*&replace=\1][myString][/grep]>>>>>> This will work to ignore the case where no number is in the string.>>> It will return an apartment number if there is no street number.>>>>>> >> --------------------------------------------------------->> 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>> old archives: http://dev.webdna.us/TalkListArchive/>>>>>> >> ---------------------------------------------------------> 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> old archives: http://dev.webdna.us/TalkListArchive/>>> ---------------------------------------------------------> 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> old archives: http://dev.webdna.us/TalkListArchive/>>> ---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usold archives: http://dev.webdna.us/TalkListArchive/
"Michael A. DeLorenzo"
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:
Beta 18 (1997)
Exclamation point (1997)
WebCatalog [FoundItems] Problem - LONG - (1997)
WebCat2b12 CGI Mac - [shownext] problem (1997)
Can I invoke an ssi plugin from within a webcat page (1997)
Further tests with the infamous shipCost (1997)
Where's Cart Created ? (1997)
Disconts (2004)
Help! WebCat2 bug (1997)
[WebDNA] jumpstart me? - how to auto-upload to a remote server? (2010)
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
Create Folder Question... (2000)
really wierd browser truncating (1997)
textarea (2000)
Encrypt Problems (2000)
When do we get to request new features? (1999)
Linux -> OS X (2002)
A few questions. . . (1997)
HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997)
Changing the value assigned to a formvariable (2000)