Re: [WebDNA] ONLY the FIRST continuous run of numeric chars?
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 101251
interpreted = N
texte = Zero or more non-numbers followed by one or more numbers and then what followsOR (i.e. if no match)everything.If there is a match in the first part before the pipe, then grep willuse that and ignore the request to grab everything. The second partwas added to ignore addresses without a number and return the blankyou wanted.BillOn Tue, Oct 21, 2008 at 12:19 PM, 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]
Associated Messages, from the most recent to the oldest:
Zero or more non-numbers followed by one or more numbers and then what followsOR (i.e. if no match)everything.If there is a match in the first part before the pipe, then grep willuse that and ignore the request to grab everything. The second partwas added to ignore addresses without a number and return the blankyou wanted.BillOn Tue, Oct 21, 2008 at 12:19 PM, 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]
"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:
E-mail loop ! (1997)
Grep to convert characters to html entities (2006)
requiring form fields? (2000)
Re:What file? (1997)
Count Characters (2005)
Re:no [search] with NT (1997)
Some Questions (1997)
Scoping rules in WebDNA 4.0 (2000)
For those of you not on the WebCatalog Beta... (1997)
[random] only for 1-100??? (1997)
Summ=T Problem (1997)
Multiple Newcarts (1996)
Editing two databases in one form using [replace]? (1998)
Server IP address-thanks (2004)
The Best Shopping Cart Solution I Have Come Upon (2003)
[WebDNA] User Management System [Cookie] (2008)
Nesting format tags (1997)
Search Trouble (2002)
Emailer errors (1997)
ANother SHOWIF problem (1997)