Re: [WebDNA] ONLY the FIRST continuous run of numeric chars?
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 101217
interpreted = N
texte = Try:[grep search=3D(^[0-9][0-9][0-9][0-9]*)&replace=3DYour=20Number][myString][/grep]GJKOn Mon, 20 Oct 2008 15:35:56 -0600 Govinda
wrote:> I appreciate your time/effort Bill and Stuart!>=20> I am still stuck on this though, and I think the issue=20>is on the side of WebDNA...>=20> OK, real simple, from the top:>=20> this:> [text show=3DF]myString=3D1155 Bluebridge, apt.#2[/text]> [grep=20>search=3D([^0-9]*)([0-9][0-9]*)([^0-9]*)&replace=3D\2][myString][/=20>grep]>=20> is returning this:> 11552>=20> I only want "1155". Can I do that with [grep]?>=20> -G>=20> On Oct 20, 2008, at 2:36 PM, William DeVaul wrote:>=20>> You are matching zero numbers in the middle parens.>>>> search=3D([^0-9]*)([0-9][0-9]*)([^0-9]*)>>>> Should work with the WebDNA regex engine. In another=20>>engine, the>> second * would be + (one or more).>>>> Bill
Associated Messages, from the most recent to the oldest:
Try:[grep search=3D(^[0-9][0-9][0-9][0-9]*)&replace=3DYour=20Number][myString][/grep]GJKOn Mon, 20 Oct 2008 15:35:56 -0600 Govinda wrote:> I appreciate your time/effort Bill and Stuart!>=20> I am still stuck on this though, and I think the issue=20>is on the side of WebDNA...>=20> OK, real simple, from the top:>=20> this:> [text show=3DF]myString=3D1155 Bluebridge, apt.#2[/text]> [grep=20>search=3D([^0-9]*)([0-9][0-9]*)([^0-9]*)&replace=3D\2][myString][/=20>grep]>=20> is returning this:> 11552>=20> I only want "1155". Can I do that with [grep]?>=20> -G>=20> On Oct 20, 2008, at 2:36 PM, William DeVaul wrote:>=20>> You are matching zero numbers in the middle parens.>>>> search=3D([^0-9]*)([0-9][0-9]*)([^0-9]*)>>>> Should work with the WebDNA regex engine. In another=20>>engine, the>> second * would be + (one or more).>>>> Bill
"Gary Krockover"
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:
Image download problem (2001)
answers - opinions? (1998)
date pref (1999)
POSTing to a secure server ... (2000)
Generating unique SKU from [cart] (1997)
Shipping Calc - done (1998)
Date Sorting (1997)
Delete Context - to remove record (1998)
Temporary Serial Numbers for the Beta (2000)
WebCat Contest (1998)
Join us at MacWorld -- in the booth and after the show!!! (1999)
Thanks Grant (1997)
replace using &append=T (2007)
Include a big block of text (1997)
[Announce]: Web server security and password protection (1997)
Checking for pre-existing passwords (1998)
F3 crashing server (1997)
FW: About that math question ... (2003)
Sensations (1997)
WebCat Error Log problem (2.0.1, acgi, Mac) (1997)