Re: Regular Expression
- From: "Larry Lard" <larrylard@xxxxxxxxxxx>
- Date: 19 Jul 2005 03:29:17 -0700
asadikhan@xxxxxxxxx wrote:
> Hi,
>
> I want to create a regular expression. I have come up with something
> like this:
>
> Scan*ValRel(QualValRel)*
>
> which basically means that I should see:
>
> zero or more of "Scan"
> exactly one of "Val"
> exactly one of "Rel"
> zero or more of "ScanValRel"
>
> however I can't seem to get this right. I used Expresso as well to try
> to come up with the right expression. The closest I got was:
>
> (Scan)*(Val)(Rel)(QualValRel)*
>
> but this allows
>
> ScanValValRel (as it finds ValRel as part of this string). I don't want
> it to do that.
>
> As specified above, I want to find exactly one of Val (no more) etc.
>
> How do I do this?
Simply put ^ and $ at the start and end (respectively) of your pattern,
to require that the *whole* of the input string matches the *whole* of
the pattern
--
Larry Lard
Replies to group please
.
- References:
- Regular Expression
- From: asadikhan
- Regular Expression
- Prev by Date: Migration from ASP3.0 design to ASP.NET (Tips, Pointers, Preference)
- Next by Date: Best Practices - C#.NET Web Application Development
- Previous by thread: Re: Regular Expression
- Next by thread: ODE for .NET?
- Index(es):
Relevant Pages
|