Re: regex result question
- From: "gs" <gs@xxxxxxxxxx>
- Date: Sun, 4 Sep 2005 17:40:58 -0600
I oversimplified. The original pattern string has month names and
abbreviations. It did capture the date string
my actual code fragment for the pattern is like the attached txt file
(unwieldy). I did tried to make it more readable with creating the
subparts first then joining them together. I suppose I could have gone a
step further on that day and month subcomponents but I use the existing 5
format items as they have been previously used to captured for what I wanted
although not foolproof.
"dfoster" <dfoster@xxxxxxxxxxxxxxxx> wrote in message
news:slrndhmc1p.fm9.dfoster@xxxxxxxxxxxxxxxxxxxxxxxx
> On 2005-09-04, gs <gs@xxxxxxxxxx> wrote:
>> is it OK to get regex result of pattern which has duplicate reference
>> names
>
> Yes...
>
>> like
>> StrDatePattern As String
>>="\b(((?<year>\d{4})-(?<month>\d{1,2})-(?<day>\d{2}))|{(?<month>\d{1,2})
>> (?<day>\d{2}), (?<year>\d{4})))"?
>
> That doesn't compile. What's the '{' character right after the pipe
> supposed to do? Regexes get so dense that it's important to copy and
> paste the pattern into your post rather than retype it. The smallest
> mistake can make your question impossible to answer.
>
> It seems that you want a '(' rather than a '{' there, but that means
> you're trying match strings like "12 23, 2005". That's possible, but it
> seems like a strange date format.
>
>
>> my code segment
>>
> ...
>
>> Dim m as match = r.Match(myStringHoldingDateInfo)
>
> The obvious question here is what is the input string you're trying to
> match. Without that information, it's hard to know what the problem
> is.
>
>
begin 666 z1.txt
M#0H@(" @1&EM('-T<E!A=')N<R@W*2!!<R!3=')I;F<@)R!F;W(@8G5I;&QD
M:6YG($1!5$50871T97)N#0H@(" @<W1R4&%T<FYS*# I(#T@(EQB*"(-"B @
M("!S=')0871R;G,H,2D@/2 B*"@_/'EE87(^7&1[-'TI7"XH/SQM;VYT:#Y*
M04Y\1D5"?$U!4GQ!4%)\34%9?$I53GQ*54Q\055'?%-%4'Q/0U1\3D]6?$1%
M0WQ*04Y505)9?$9%0E)505)9?$U!4D-(?$%04DE,?$U!67Q*54Y%?$I53%E\
M055'55-4?%-%4%1%34)%4GQ/0U1/0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;7'-=*#\\9&%Y/C,P?#,Q?%LQ+3E=
M?#!;,2TY77Q;,3)=>S L,7U;,"TY72DH*"Q;7'-=*7Q;7'-=*2@_/'EE87(^
M*%QD>S)]*7PH7&1[-'TI*2DB#0H@(" @<W1R4&%T<FYS*#8I(#T@(GPH*#\\
M9&%Y/C,P?#,Q?%LQ+3E=?#!;,2TY77Q;,3)=>S L,7U;,"TY72E;("\M72@\
M/VUO;G1H/DI!3E5!4EE\1D5"4E5!4EE\34%20TA\05!224Q\34%9?$I53D5\
M2E5,67Q!54=54U1\4T505$5-0D52?$]#5$]"15)\3D]614U"15)\1$5#14U"
M15)\2D%.?$9%0GQ-05)\05!2?$U!67Q*54Y\2E5,?$%51WQ315!\3T-4?$Y/
M5GQ$14-\*%LP77LP+#%]6S$M.5TI?#$P?#$Q?#$R*5L@+RU=*#\\>65A<CY<
M9'LT?2DI(@T*(" @('-T<E!A=')N<R@W*2 ]("(I7&(B#0H@(" @1$%415!A
M='1E<FX@/2!*;VEN*'-T<E!A=')N<RP@(B(I#0H-"B @("!R(#T@3F5W(%)E
M9V5X*$1!5$50871T97)N+"!296=E>$]P=&EO;G,N26=N;W)E0V%S92D-"@T*
`
end
.
- Follow-Ups:
- Re: regex result question
- From: dfoster
- Re: regex result question
- References:
- regex result question
- From: gs
- Re: regex result question
- From: dfoster
- regex result question
- Prev by Date: Re: Wrong function bound?
- Next by Date: Re: Public Variables
- Previous by thread: Re: regex result question
- Next by thread: Re: regex result question
- Index(es):
Relevant Pages
|