Re: [SOT] Filters, partial strings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Peter Palmreuther ! On Mon, 10 Dec 2001 00:50:31 +0100 GMT your local time, which was 10.12.2001, 00:50 (GMT+0100) where I live, you wrote: [...] '123.456.789.698' as you have no chance to validate the number is between 0 255 (including), but it's quite sure better than nothing :-) Why not using [012][0-5][0-5] if it is always a three-digit number (else you have to use alternatives...) Sorry, I know this should be posted in TBTech. Mea culpa. - -- Best regards, Gerd == Using The Bat! Version 1.53t PGP/GPG-Keys on request mailto:[EMAIL PROTECTED]?subject=send_key - Breeding rabbits is a hare raising experience. -BEGIN PGP SIGNATURE- Version: PGP 6.5.8 ckt Comment: Key-ID: 0x0FB66C7D or 0xD56C6187 iQA/AwUBPBXG90y/sHrVbGGHEQIMeQCfaaVKeDX/gL8hM0pPGVYBcyf53f0An3sn B9RxWltEeWNyWzbHiI/cukB8 =bSI6 -END PGP SIGNATURE- -- Archives : http://tbudl.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] TBTech List: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Latest Vers: 1.53d FAQ: http://faq.thebat.dutaint.com
Re: [SOT] Filters, partial strings
Hi Gerd, An archeological dig discovered that on Tuesday, December 11, 2001 at 10:42 GMT +0100, Gerd Ewald [GE] typed the following: GE Hello Peter Palmreuther ! GE On Mon, 10 Dec 2001 00:50:31 +0100 GMT your local time, GE which was 10.12.2001, 00:50 (GMT+0100) where I live, you wrote: GE [...] '123.456.789.698' as you have no chance to validate the number is between 0 255 (including), but it's quite sure better than nothing :-) GE Why not using [012][0-5][0-5] if it is always a three-digit number GE (else you have to use alternatives...) -- Thanks for writing, Januk Aggarwal Using The Bat! 1.54 Beta/15 under Windows 98 4.10 Build 67766446 A I've determined the momentum of my physics assignment so precisely that it can be anywhere in the universe right now. -- Archives : http://tbudl.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] TBTech List: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Latest Vers: 1.53d FAQ: http://faq.thebat.dutaint.com
Re: [SOT] Filters, partial strings
Hi Gerd, It was foretold that on Tuesday, December 11, 2001 at 10:42 GMT +0100, Gerd Ewald [GE] would type: '123.456.789.698' as you have no chance to validate the number is between 0 255 (including), but it's quite sure better than nothing :-) GE Why not using [012][0-5][0-5] if it is always a three-digit number GE (else you have to use alternatives...) That regular expression won't catch all three digit numbers between 0 and 255, it will catch all numbers from: 000-055, 100-155, 200-255 You're missing ranges. One that might work better is: (\d|\d\d|[01]\d\d|2[0-5][0-5])\D Of course this is significantly more complicated, but it should work for any number between 0 and 255. The added bonus is it isn't limited to 3 digit numbers. -- Thanks for writing, Januk Aggarwal Despite these words, this page is blank. -- Archives : http://tbudl.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] TBTech List: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Latest Vers: 1.53d FAQ: http://faq.thebat.dutaint.com
Re: [SOT] Filters, partial strings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Januk Aggarwal ! On Tue, 11 Dec 2001 02:08:22 -0800 GMT your local time, which was 11.12.2001, 11:08 (GMT+0100) where I live, you wrote: [...] That regular expression won't catch all three digit numbers between 0 and 255, it will catch all numbers from: 000-055, 100-155, 200-255 Aaarrrgghh, you are right. Seems as if I'm still in bed ;-) I should test my ideas before. You're missing ranges. One that might work better is: (\d|\d\d|[01]\d\d|2[0-5][0-5])\D When I wrote mine I remembered a regex which was printed in *Friedel*, but was too lazy to look it up. Here it is: ([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5]) Still 0.0.0.0 is possible, but this another story. - -- Best regards, Gerd == Using The Bat! Version 1.53t PGP/GPG-Keys on request mailto:[EMAIL PROTECTED]?subject=send_key - I cried because I had no sex life. Then I met a man with no hands. -BEGIN PGP SIGNATURE- Version: PGP 6.5.8 ckt Comment: Key-ID: 0x0FB66C7D or 0xD56C6187 iQA/AwUBPBXOkky/sHrVbGGHEQLDFgCcDh51lkxPU5oGFJCwGtMXwHXpEYkAn2G1 OT9KSlrXaahQE+L/CPTO/yMl =/IN2 -END PGP SIGNATURE- -- Archives : http://tbudl.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] TBTech List: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Latest Vers: 1.53d FAQ: http://faq.thebat.dutaint.com
Re: [SOT] Filters, partial strings
Hi Gerd, It was foretold that on Tuesday, December 11, 2001 at 11:14 GMT +0100, Gerd Ewald [GE] would type: You're missing ranges. One that might work better is: (\d|\d\d|[01]\d\d|2[0-5][0-5])\D Heh, mine is wrong too. Mine will miss 206-209, 216-219, 226-229, etc. GE When I wrote mine I remembered a regex which was printed in *Friedel*, GE but was too lazy to look it up. Here it is: GE ([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5]) That'll work. GE Still 0.0.0.0 is possible, but this another story. 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. 2. Remember, \d matches *any* digit. 3. What does the repeat operator '?' do? -- Thanks for writing, Januk Aggarwal Using The Bat! 1.54 Beta/15 under Windows 98 4.10 Build 67766446 A OK, I'm weird! But I'm saving up to become eccentric. -- Archives : http://tbudl.thebat.dutaint.com Moderators : mailto:[EMAIL PROTECTED] TBTech List: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Latest Vers: 1.53d FAQ: http://faq.thebat.dutaint.com