PDA

View Full Version : Regex



NewsArchive
07-13-2010, 01:32 AM
Hi Friedrich,

I was very happy to see the new RegEx feature in the new build. It came
at the right moment.

But unfotunately, I'm to stupid to use it, or there is something wrong
with it.

Can you please have a look at the attached screenshot? Thanks in advance.

Markus

NewsArchive
07-13-2010, 01:33 AM
Hi Markus,

> I was very happy to see the new RegEx feature in the new build. It came
> at the right moment.
>
> But unfotunately, I'm to stupid to use it, or there is something wrong
> with it.
>
> Can you please have a look at the attached screenshot? Thanks in advance.

Something like this (see my attached screenshot). This will evaluate as
TRUE if %VAR% contained only a single character and a colon, followed by an
optional backslash.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows 7 installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
07-13-2010, 01:34 AM
Hi Friedrich,

I added the trailing ?$ and now it works as expected (no match, if
string is empty). I can't see, why this is needed, because ^ already
means "starts with". But anyway - it works now. Thank you.

Btw:
- Your example also accepts an empty string, if you remove the ?$ from
your regex string. Is this okay?
- Is it okay, that your example has [a-zA-z] instead of [a-zA-Z]?

Markus

NewsArchive
07-13-2010, 01:34 AM
Hi Markus,

> I added the trailing ?$ and now it works as expected (no match, if string
> is empty). I can't see, why this is needed, because ^ already means
> "starts with". But anyway - it works now. Thank you.
>
> Btw:
> - Your example also accepts an empty string, if you remove the ?$ from
> your regex string. Is this okay?

We have to investigate this. I "think" it's not okay, but I am not sure.

>
> - Is it okay, that your example has [a-zA-z] instead of [a-zA-Z]?
>

IMO, it is not okay and it should be [a-zA-Z]. Otherwise, other unwanted
characters (e.g. '_' or '´') are also accepted.

Friedrich

NewsArchive
07-13-2010, 01:35 AM
Aha, sorry. My IE blocked the screenshot.

Yes, I see what you mean. There seems to be a problem with "does not
match". We already opened a ticket a few hours ago (but a new version will
not be available before August).

Friedrich

NewsArchive
10-21-2010, 01:27 AM
Hi Friedrich,

this seems not to be fixed in 7.2.3602

Markus

NewsArchive
10-21-2010, 01:27 AM
Hi Markus,

>
> this seems not to be fixed in 7.2.3602
>

The ticket is still "open". I don't think that we'll see a fix for it in
7.3.

Friedrich

NewsArchive
10-24-2010, 07:27 AM
Fixed in the internal V7.3 source codes now. If the string is empty, it
returns DOES NOT MATCH.

Friedrich

NewsArchive
10-25-2010, 12:49 AM
Thank you

Markus Zander

NewsArchive
05-06-2011, 01:23 PM
OK in 3313

Markus Zander