Re: match pattern

2009-09-18 Thread Uri Guttman
> "JB" == Jim Bauer writes: >> if ( m!(www.\S+.com)!s ) { JB> Try m!(www.\S+.com)!sg don't use alternate delimiters unless you must. it makes for harder to read code. stick with // unless you have a / inside the regex. and the best alternate delimiters are paired ones like {} as they are

Re: match pattern

2009-09-18 Thread Jim Bauer
"raphael()" wrote on Fri, 18 Sep 2009 22:10:01 +0530: >Hi > >How do I pick out matching words if there are more than one on the same >line? > > >Example > >INFILE.TXT > >www.site01.com www.site02.com www.site03.com >www.site04.com > >-- > >while (<>) { >if ( m!(www.\S+.com)!s ) { Try m!(

Re: match pattern

2009-09-18 Thread Shawn H Corey
raphael() wrote: Hi How do I pick out matching words if there are more than one on the same line? Example INFILE.TXT www.site01.com www.site02.com www.site03.com www.site04.com -- while (<>) { if ( m!(www.\S+.com)!s ) { # print "$1\n"; # print "$&\n"; print;

match pattern

2009-09-18 Thread raphael()
Hi How do I pick out matching words if there are more than one on the same line? Example INFILE.TXT www.site01.com www.site02.com www.site03.com www.site04.com -- while (<>) { if ( m!(www.\S+.com)!s ) { # print "$1\n"; # print "$&\n"; print; }; } -- I wan