> "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
"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!(
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;
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