FW: regex question -- SOLVED!

2002-02-11 Thread Toby Stuart
Solved. Thanks to Edward G. Orton t0by -Original Message- From: Edward G. Orton [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 3:15 PM To: Toby Stuart; [EMAIL PROTECTED] Subject: Re: regex question - Original Message - From: "Toby Stuart" <[EMAIL P

Re: regex question

2002-02-11 Thread Edward G. Orton
- Original Message - From: "Toby Stuart" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 11, 2002 10:57 PM Subject: regex question > Hi All, > > I have the following lines in a file > > > Some Client - ABC - DEF > Some O

regex question

2002-02-11 Thread Toby Stuart
Hi All, I have the following lines in a file Some Client - ABC - DEF Some Other Client - XYZ Another Client I need a regex to remove everything after the last dash (-) if one is present. I know this is possible i just cannot figure. I'm about to use split etc. but i know there's a better wa

Re: regex question

2001-10-04 Thread Mick Ghazey
my @strings = qw( hello\] hi_there] how_are_you2\] fine-and-you\] good_thanks]); for(@strings){ my $matched = /(.*)\\*?\]$/; if( $matched ) { print "matched! - $1 \n" } else { print "no match - $1 \n" } } matched! - hello\ matched! - hi_there matched! - how_are

RE: regex question

2001-10-04 Thread Lee Goddard
ostolia (ISS Atlanta) > Sent: 04 October 2001 17:36 > To: Perl-Win32 (E-mail) > Subject: regex question > > > hello all, > I need some help with regex again... > > I have a file that looks like this: > > hello\] > hi_there] > how_are_you2\] > fine-and-

regex question

2001-10-04 Thread Schiza, Apostolia (ISS Atlanta)
hello all, I need some help with regex again... I have a file that looks like this: hello\] hi_there] how_are_you2\] fine-and-you\] good_thanks] I need my regex to much all these strings above. The only way now that I can do this is by having 2 regex : while ( ) { if( $_ =~ m/(.*)\\\]/

Re: regex question...

2001-06-19 Thread Andy McKay
t; To: "Perl-Win32 (E-mail)" <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2001 3:46 PM Subject: RE: regex question... > If you really want a 'correct' IP, you could use this: > > $ip_addr =~ > /^(([01]?\d\d?|2[0-4]\d|25[0-5])\.){3}([01]?\d\d?|2[0-4]\d|25[0-5]

Re: regex question...

2001-06-13 Thread $Bill Luebkert
Tim Hammerquist wrote: > > "$Bill Luebkert" wrote: > > > > "Schiza, Apostolia (ISS Atlanta)" wrote: > > > > > > Hi, > > > in one of my perl scripts I am trying to check for a valid ip address, > > > ie in the format of XXX.XXX.XXX.XXX where x of course is digit, > > > and you can have ips with ea

Re: regex question...

2001-06-13 Thread Tim Hammerquist
"$Bill Luebkert" wrote: > > "Schiza, Apostolia (ISS Atlanta)" wrote: > > > > Hi, > > in one of my perl scripts I am trying to check for a valid ip address, > > ie in the format of XXX.XXX.XXX.XXX where x of course is digit, > > and you can have ips with each feild having 1-3 digits > > This is th

regex question...

2001-06-13 Thread Schiza, Apostolia (ISS Atlanta)
> Hi, > in one of my perl scripts I am trying to check for a valid ip address, > ie in the format of XXX.XXX.XXX.XXX where x of course is digit, > and you can have ips with each feild having 1-3 digits > This is the regex I am using: > > $ip_addr =~ m/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ > (I am

RE: regex question...

2001-06-13 Thread Richard A. Evans
If you really want a 'correct' IP, you could use this: $ip_addr =~ /^(([01]?\d\d?|2[0-4]\d|25[0-5])\.){3}([01]?\d\d?|2[0-4]\d|25[0-5])$/ This RegEx (based on page 124 of "Mastering Regular Expressions", O'Reilly) forces the numbers to be in the range 0 - 255. There is one, and only one problem

Re: regex question...

2001-06-13 Thread $Bill Luebkert
"Schiza, Apostolia (ISS Atlanta)" wrote: > > Hi, > in one of my perl scripts I am trying to check for a valid ip address, > ie in the format of XXX.XXX.XXX.XXX where x of course is digit, > and you can have ips with each feild having 1-3 digits > This is the regex I am using: > > $ip_addr =~ m/\

regex question...

2001-06-13 Thread Schiza, Apostolia (ISS Atlanta)
Hi, in one of my perl scripts I am trying to check for a valid ip address, ie in the format of XXX.XXX.XXX.XXX where x of course is digit, and you can have ips with each feild having 1-3 digits This is the regex I am using: $ip_addr =~ m/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/ (I am basically trying

Re: REGEX question / delete tags

2001-05-13 Thread Ron Grabowski
> $parts[2] =~ s/<.?[td|table|tr](.*)>//g; [] is a character class, you are telling Perl to match a 't' or a 'd' or a '|' or an 'a', etc. $parts[2] =~ s/<.?(?:td|table|tr)(.*?)>//g; Should fix the problem of everything being deleted. I recall there being a HTML::TableExtract module which you co

REGEX question / delete tags

2001-05-13 Thread Kristofer Wolff
hi all, i have a problem with a table i want to read out.. I have to deleate all the tag first. (HTML::Parser or else issnt reading tables, issn't it ? ) so I tryed this $parts[2] =~ s/<.?[td|table|tr](.*)>//g; but it kills all ! hm, ??? hoq do i do this ? greets ven ___