regexp... weird results

2007-02-01 Thread oryann9
Hello Perl list, I need to grab from an intel machine all lines with :5101 from netstat -a. If I dont group the regexp using parens then it prints all the needed lines. If I group the regexp using parens then it does not print all the needed lines. Any help and an explanation...I am c

Re: regexp... weird results

2007-02-01 Thread oryann9
oryann9 <[EMAIL PROTECTED]> wrote:Hello Perl list, I need to grab from an intel machine all lines with :5101 from netstat -a. If I dont group the regexp using parens then it prints all the needed lines. If I group the regexp using parens then it does not print all the needed lines. Any help a

Re: regexp... weird results

2007-02-01 Thread Jay Savage
On 2/1/07, oryann9 <[EMAIL PROTECTED]> wrote: oryann9 <[EMAIL PROTECTED]> wrote:Hello Perl list, [snip] I was able to figure it out. The solution was /s. my $regexp = qr/.*\x3a5101.*/s; However, when I put multiple port numbers in the regexp it does NOT work. I want to store the

Re: regexp... weird results

2007-02-02 Thread oryann9
Jay Savage <[EMAIL PROTECTED]> wrote:On 2/1/07, oryann9 wrote: > oryann9 wrote: Hello Perl list, > [snip] > > I was able to figure it out. The solution was /s. > my $regexp = qr/.*\x3a5101.*/s; > > However, when I put multiple port numbers in the regexp it does NOT work. > I want to store them

Re: regexp... weird results

2007-02-02 Thread Tom Phoenix
On 2/2/07, oryann9 <[EMAIL PROTECTED]> wrote: I am aware of the bit | operator Perl does have a bitwise operator whose name is the vertical pipe character; but the one under discussion is the regular expression operator whose name is the vertical pipe character. Both uses treat the vertical ba