Re: More regular expression woes
- From: johnknox@xxxxxxxxxxxxxxxxxxxx (John Kn [MS])
- Date: Tue, 30 Jan 2007 21:12:35 GMT
Oliver,
\b\d{7,8}\b works for me.
Thanks,
John
--------------------
From: "Oliver Sturm" <oliver@xxxxxxxxxxxx><xn0f1qvzhcrzq1000@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: More regular expression woes
References: <ud4wgxvQHHA.4744@xxxxxxxxxxxxxxxxxxxx>
<ay7lzjJRHHA.196@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Jan 2007 19:39:36 +000083.216.141.166
User-Agent: XanaNews/1.18.1.3
Message-ID: <xn0f1u0vm1irnlh00q@xxxxxxxxxxxxxxxxxxxx>
X-Ref: msnews.microsoft.com ~XNS:00000864
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: 83-216-141-166.oliver856.adsl.metronet.co.uk
Lines: 1
Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP04.phx.gbl
Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.dotnet.languages.csharp:11780
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
Hello John,
@"\b\d{7}\b|\b\d{8}\b",
An interesting additional idea, although obviously not really flexible - I
would opt for the flexibility of \d{7,8} as long as I can make it work.
Furthermore, your example could be less confusing, IMO, as
\b(\d{7}|\d{8})\b
Or of course, as
\b\d{7,8}\b
which brings us back to what has already been mentioned. Maybe I'm missing
the point of your post?
Oliver Sturm
--
http://www.sturmnet.org/blog
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0
MS Sans Serif;}{\f1\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.21.2500;}\viewkind4\uc1\pard\f0\fs20 Cheers,\par
\par
johnKn [MS-SDK]\par
\par
\par
\par
-Please do not send email directly to this alias. This alias is for \par
newsgroup purposes only\par
\par
-This posting is provided "AS IS" with no warranties, and confers no
rights.\par
\par
-To provide additional feedback about your community experience please send
\par
e-mail to: sdkcomm@xxxxxxxxxxxxx\par
\f1\par
}
.
- References:
- More regular expression woes
- From: Mark Rae
- Re: More regular expression woes
- From: Brad Prendergast
- Re: More regular expression woes
- From: John Kn [MS]
- Re: More regular expression woes
- From: Oliver Sturm
- More regular expression woes
- Prev by Date: Re: Does typeof or is work when dealing with an interface?
- Next by Date: Re: Does typeof or is work when dealing with an interface?
- Previous by thread: Re: More regular expression woes
- Next by thread: smo create database object
- Index(es):
Relevant Pages
|
|