Thank you Thierry, it works very well. Now it accepts all a the date formats.
All the best
Paolo
On Wed, Jan 11, 2012 at 12:59 PM, Thierry Douez wrote:
> Hi Paolo,
>
> Both of these solutions work great.
>> However, to me, a perfect solution would be a combination of the two,
>>
>> A Regular Exp
Hi Paolo,
Both of these solutions work great.
> However, to me, a perfect solution would be a combination of the two,
>
> A Regular Expression that accept
>
> 05/01/2011
> 05-01-2011
> 05.01.2011
> ...
> and also
>
> 11/9/2011
> 5/10/2011
> ...
> as a date.
>
If you need an optional '0' for one
Thank you all.
You are the wizards of Regular Expressions!
Both of these solutions work great.
However, to me, a perfect solution would be a combination of the two,
A Regular Expression that accept
05/01/2011
05-01-2011
05.01.2011
...
and also
11/9/2011
5/10/2011
...
as a date.
Thank you ve
Wow. Ok, ignore the one I sent.
On Thu, Jan 5, 2012 at 10:07 AM, Thierry Douez wrote:
> 2012/1/5 paolo mazza
>
> > Thank you Thierry,
> > your regular expression works. It was very kind of you.
> > All the best
> >
> > Paolo
> >
>
> Hi again Paolo,
>
> Just for fun...
>
> Look at this new Reg e
2012/1/5 paolo mazza
> Thank you Thierry,
> your regular expression works. It was very kind of you.
> All the best
>
> Paolo
>
Hi again Paolo,
Just for fun...
Look at this new Reg exp. below
and see how it matches more precisely dates...
felice anno nuovo !
Thierry
on mouseUp
-- Bad:
If you decide to try a regex again (they give me headaches but sometimes
work great) you could try the following.
on mouseUp
put "sfgsfg gsfgs g 05/01/2011 t trtr" into FULLTEXT
put "(\d{1,2}\/\d{1,2}\/\d{2,4})" into MYSTRYNG
put matchText(FULLTEXT,MYSTRYNG,VAR0) into MYRESULT
put VAR0
I too am much in favor of using LC's text parsing rather than RegEx, which I
admit is a prejudice (but one with foundation!). Beware, however, that the "is
a date" function will return true for any number. I usually double-check this
with something like:
put "sfgsfg gsfgs g 05/01/2011 t trtr" i
Thank you Thierry,
your regular expression works. It was very kind of you.
All the best
Paolo
On Thu, Jan 5, 2012 at 11:24 AM, Thierry Douez wrote:
> Hi Paolo,
>
> I changed your regular expression; see below.
>
> Didn't check but should work.
>
> HTH
>
> Thierry
>
> 2012/1/5 paolo mazza
>
>> H
Thank you Bernard,
actually your LC solution is much readable compared to the Regular
Expression thing.
However I was trying to understand regular expression that sometimes
are very useful.
Thanks a lot
Paolo
On Thu, Jan 5, 2012 at 11:23 AM, Bernard Devlin wrote:
> I just want to offer the simple
Hi Paolo,
I changed your regular expression; see below.
Didn't check but should work.
HTH
Thierry
2012/1/5 paolo mazza
> Hi All,
> I have to find the date in a text. If I use this Regular Expression,
> it finds the date (returns true) but it returns just the first chars
> of the date..
>
> o
I just want to offer the simplest solution first. If there's a reason
why this won't work, please say.
put "sfgsfg gsfgs g 05/01/2011 t trtr" into tText
repeat for each word tWord in tText
if tWord is a date then put tWord & cr after tFound
end repeat
put tFound
Maybe you are just looking to ex
Hi All,
I have to find the date in a text. If I use this Regular Expression,
it finds the date (returns true) but it returns just the first chars
of the date..
on mouseUp
put "sfgsfg gsfgs g 05/01/2011 t trtr" into FULLTEXT
put "((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2}))" into MYSTRYN
12 matches
Mail list logo