-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello Januk Aggarwal !


On Tue, 11 Dec 2001 02:43:14 -0800 GMT your local time,
which was 11.12.2001, 11:43 (GMT+0100) where I live, you wrote:

[...]

GE>> ([01]?\d\d?|2[0-4]\d|25[0-5])\. [snipped:]

> That'll work.

GE>> Still 0.0.0.0 is possible, but this another story.

What I meant was, that this regex matches an invalid/impossible
IP-Number. I hope you understood me that way. If yes, then I assume,
you will teach me how to modify the regex so that 0.0.0.0 will not
be matched. :-) Would be great!

> Friedel's regexp will catch this case too.  We can take this to TBTECH
> if you want to know how.

> Hints: 1. Look at the first alternative for each set of numbers.

You mean: [01]?\d\d?

>        2. Remember, \d matches *any* digit.

Yep, and what we want is any digit but 0 if it is the only digit.

>        3. What does the repeat operator '?' do?

0 or one occurence of the character.

I don't see a way to do what you mean. Except one could check with a
look-ahead assertion.

- --
Best regards,
 Gerd
======================================
Using The Bat! Version 1.53t
PGP/GPG-Keys on request mailto:[EMAIL PROTECTED]?subject=send_key
- ----------------------------------------------------------------------------
Get your facts first, and then you can distort them as much as you please.
     Mark Twain

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8 ckt
Comment: Key-ID: 0x0FB66C7D or 0xD56C6187

iQA/AwUBPBXnU0y/sHrVbGGHEQImNACg2g2dNFaYjEAQZWPD/tR1ngRRm40AnR21
LMyTXCWkzaE3E8kNjRL81MoI
=38jB
-----END PGP SIGNATURE-----


-- 
______________________________________________________
Archives   : http://tbtech.thebat.dutaint.com
Moderators : mailto:[EMAIL PROTECTED]
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to