Re: [WebDNA] ONLY the FIRST continuous run of numeric chars?

This WebDNA talk-list message is from

2008


It keeps the original formatting.
numero = 101226
interpreted = N
texte = [text show=F]myString=1155 Bluebridge, apt.#2[/text] [grep search=[^0-9]*([0-9][0-9]*).*&replace=\1][myString][/grep] The above works in the situation you've described, namely the first number of 1 or more digits returned and nothing else. I'm not sure why you wanted the other text for back reference. To the question below, WebDNA regex does not handle one or more, i.e. +, the way you'd expect. The workaround is to repeat the reference. Bill On Mon, Oct 20, 2008 at 5:35 PM, Govinda wrote: > I appreciate your time/effort Bill and Stuart! > > I am still stuck on this though, and I think the issue is on the side of > WebDNA... > > OK, real simple, from the top: > > this: > [text show=F]myString=1155 Bluebridge, apt.#2[/text] > [grep search=([^0-9]*)([0-9][0-9]*)([^0-9]*)&replace=\2][myString][/grep] > > is returning this: > 11552 > > I only want "1155". Can I do that with [grep]? > > -G > > On Oct 20, 2008, at 2:36 PM, William DeVaul wrote: > >> You are matching zero numbers in the middle parens. >> >> search=([^0-9]*)([0-9][0-9]*)([^0-9]*) >> >> Should work with the WebDNA regex engine. In another engine, the >> second * would be + (one or more). >> >> Bill >> > --------------------------------------------------------- > 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/ > Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("William DeVaul" 2008)
  2. RE: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("Michael A. DeLorenzo" 2008)
  3. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Matthew Bohne 2008)
  4. RE: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("Michael A. DeLorenzo" 2008)
  5. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Gary Krockover 2008)
  6. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Matthew Bohne 2008)
  7. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Govinda 2008)
  8. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("William DeVaul" 2008)
  9. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Govinda 2008)
  10. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("William DeVaul" 2008)
  11. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Govinda 2008)
  12. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Govinda 2008)
  13. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("Gary Krockover" 2008)
  14. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Govinda 2008)
  15. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Patrick McCormick 2008)
  16. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Terry Wilson 2008)
  17. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Charles Kline 2008)
  18. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("Gary Krockover" 2008)
  19. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("Gary Krockover" 2008)
  20. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Stuart Tremain 2008)
  21. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Govinda 2008)
  22. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Stuart Tremain 2008)
  23. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? ("William DeVaul" 2008)
  24. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Govinda 2008)
  25. Re: [WebDNA] ONLY the FIRST continuous run of numeric chars? (Stuart Tremain 2008)
  26. [WebDNA] ONLY the FIRST continuous run of numeric chars? (Govinda 2008)
[text show=F]myString=1155 Bluebridge, apt.#2[/text] [grep search=[^0-9]*([0-9][0-9]*).*&replace=\1][myString][/grep] The above works in the situation you've described, namely the first number of 1 or more digits returned and nothing else. I'm not sure why you wanted the other text for back reference. To the question below, WebDNA regex does not handle one or more, i.e. +, the way you'd expect. The workaround is to repeat the reference. Bill On Mon, Oct 20, 2008 at 5:35 PM, Govinda wrote: > I appreciate your time/effort Bill and Stuart! > > I am still stuck on this though, and I think the issue is on the side of > WebDNA... > > OK, real simple, from the top: > > this: > [text show=F]myString=1155 Bluebridge, apt.#2[/text] > [grep search=([^0-9]*)([0-9][0-9]*)([^0-9]*)&replace=\2][myString][/grep] > > is returning this: > 11552 > > I only want "1155". Can I do that with [grep]? > > -G > > On Oct 20, 2008, at 2:36 PM, William DeVaul wrote: > >> You are matching zero numbers in the middle parens. >> >> search=([^0-9]*)([0-9][0-9]*)([^0-9]*) >> >> Should work with the WebDNA regex engine. In another engine, the >> second * would be + (one or more). >> >> Bill >> > --------------------------------------------------------- > 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/ > "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:

Need relative path explanation (1997) WebCat2: multiple currency support (1997) shipcost (1997) Stock Quotes (2000) Loops N Variables (1998) Generating unique SKU from [cart] (1997) WCf2 and nested tags (1997) [WebDNA] backup / mirror website & databases (2018) Emailer problems solved (1997) ASP and WebDNA (1998) Nested vs conditional (1997) WC2.0 Memory Requirements (1997) RE: Can a database get stomped by simultaneous access? (1997) Setting up shop (1997) [SearchString] problem with [search] context (1997) Make sure I understand this??? (1997) [searchString] (1997) displaying New products (using [date]) (1997) Tab Charactor (1997) WebCat2b13MacPlugin - nested [xxx] contexts (1997)