in reply to Re: Re: Re: Quarms with RegEx
in thread Quarms with RegEx
Output:#!/usr/bin/perl -w use strict; for ('#abc',' abc','abc','# abc',' #abc') { my $v1 = ($_ !~ /^#\s/ and $_ !~ /^\s/) || 0; # yours my $v2 = ($_ !~ /^#?\s/) || 0; # mine print "$v1 $v2 '$_'\n"; }
1 1 '#abc' 0 0 ' abc' 1 1 'abc' 0 0 '# abc' 0 0 ' #abc'
-Blake
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Quarms with RegEx
by busunsl (Vicar) on Aug 28, 2001 at 13:53 UTC |