Re: regex syntax
- From: "jg" <junk@xxxxxxxx>
- Date: Mon, 22 Aug 2005 23:32:09 -0600
thank you again. you are wonderfully helpful.
I did find the pattern string getting too huge. So I started to split date
pattern into 3 components before using them to compose the final pattern,
although I did not use the string format method.
"Oliver Sturm" <oliver@xxxxxxxxxxxx> wrote in message
news:eQV5%23lJpFHA.620@xxxxxxxxxxxxxxxxxxxxxxx
> jg wrote:
>
>> Great, it works even after taking out the $ and the space around the |..
>> I did add \b before the entire expression to make sure the first part of
>> the date is on the word boundary. This way I can avoid some supposedly
>> low probability errors like some strange catalogue dot or dash notations
>
> Sure, I didn't know your exact circumstances, so you'd have to make
> modifications to my sample to make it work for you completely.
>
>> Now all I have to do is to make it work with January, February,... (
>> fully spelled month names). I guess I can always add another 12 | parts
>> to the month expressions
>
> Sure you can. If you find the whole thing growing too much, maybe you
> could define the various parts you need (the month expression, the day
> expression, the two digit year, the four digit year) as string constants
> in your code and use a String.Format to put them together to form the
> complete regular expression before you use it. That way it might be a bit
> more maintainable - otherwise you'll have to make every change to one of
> the parts in many places, increasing the probability of an error.
>
>
>
> Oliver Sturm
> --
> omnibus ex nihilo ducendis sufficit unum
> Spaces inserted to prevent google email destruction:
> MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
> ICQ 27142619 http://www.sturmnet.org/blog
.
- Follow-Ups:
- Re: regex syntax
- From: Oliver Sturm
- Re: regex syntax
- References:
- regex syntax
- From: jg
- Re: regex syntax
- From: Oliver Sturm
- Re: regex syntax
- From: jg
- Re: regex syntax
- From: jg
- Re: regex syntax
- From: Oliver Sturm
- regex syntax
- Prev by Date: RE: Debugging failed do to permissions
- Next by Date: Template for User requirement and System design documentation
- Previous by thread: Re: regex syntax
- Next by thread: Re: regex syntax
- Index(es):
Relevant Pages
|