Regexp

max4o_at_magic.g00net.org
Date: 05/28/04


Date: Fri, 28 May 2004 15:56:03 +0300 (EEST)
To: beginners@perl.org

I have the following lines:

g00:~> perl -e '
$a = "aa** a";
$b = $a;
$b =~ qw/$b/;
print "Yes\n" if $a =~ /^$b/;
print $b'
Nested quantifiers in regex; marked by <-- HERE in m/^aa** <-- HERE a/ at
-e line 5.

Is there a way to make the regexp takes '$b' as string, because
I see the non characters are problem.

Thanks

-------------------------------------
This mail is from: <max4o@g00net.org>
-------------------------------------



Relevant Pages

  • Re: perl ge and "not regexp"
    ... Is there a way to have sed-style \N ($N in perl) in gsub? ... unstructured files, so righting all this RS, FS on them is a nightmare. ... anything that doesn't match this regexp"? ... have "match doesnt_match match doesnt_match" then all bunch of characters ...
    (comp.lang.awk)
  • Re: A couple of questions from a Ruby neophyte
    ... Ruby has the One-click installer, which you can get from www.rubyforge.org ... Perl and Python have ActiveState versions of the same. ... Perl has the best regexp engine, ...
    (comp.lang.ruby)
  • Re: Need help reading a perl regexp - someone clue me?
    ... (FWIW, I'm not a Perl programmer, and the regexp ... Regexp documentation - Either the package is written in Perl, ... of digits... ...
    (comp.lang.perl.misc)
  • Re: Parsing a file that has labels
    ... > Let me explain the above perl code. ... there's something to know about perl regexps. ... As such a character doesn't exist that means the whole ... replace every occurrence of the regexp, ...
    (comp.unix.shell)
  • Re: Parsing a file that has labels
    ... Let me explain the above perl code. ... As such a character doesn't exist that means the whole ... replace every occurrence of the regexp, ...
    (comp.unix.shell)