function or operator to ignore metacharacters like +

Discussion in 'Perl' started by kelly, Jan 3, 2006.

  1. kelly

    kelly Guest

    Hi,
    I have this line that I have problem with..

    s/$tmpvar//mgi;

    The problem is sometimes $tmpvar = "annotationmarking +",
    with metacharacters. Is there a regx option or perl function
    that ignores metacharacter. Or should I go ahead and
    parse my input for metacharacters and add a \ infront of it.

    Thanks.

    JP
     
    kelly, Jan 3, 2006
    #1
    1. Advertisements

  2. kelly

    Jim Gibson Guest

    In article <>, kelly <> wrote:

    > Hi,
    > I have this line that I have problem with..
    >
    > s/$tmpvar//mgi;
    >
    > The problem is sometimes $tmpvar = "annotationmarking +",
    > with metacharacters. Is there a regx option or perl function
    > that ignores metacharacter. Or should I go ahead and
    > parse my input for metacharacters and add a \ infront of it.
    >
    > Thanks.
    >
    > JP
    >


    You are posting the same messages independently to alt.perl and
    comp.lang.perl. Please do not do that. I already wasted my time
    responding to one of your posts in comp.lang.perl that was already
    answered by Paul in alt.perl. If you must post to both groups, post one
    message to multiple groups (cross-post).

    And as I explained before, comp.lang.perl is defunct. Please do not
    start threads there.

    Thanks.

    Posted Via Usenet.com Premium Usenet Newsgroup Services
    ----------------------------------------------------------
    ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
    ----------------------------------------------------------
    http://www.usenet.com
     
    Jim Gibson, Jan 3, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dfenestr8

    html form metacharacters?

    Dfenestr8, Jan 19, 2005, in forum: HTML
    Replies:
    2
    Views:
    652
    Jukka K. Korpela
    Jan 19, 2005
  2. Nick Craig-Wood

    Avoiding shell metacharacters in os.popen

    Nick Craig-Wood, Sep 29, 2004, in forum: Python
    Replies:
    10
    Views:
    728
    David Fraser
    Oct 1, 2004
  3. Patrick Kowalzick
    Replies:
    5
    Views:
    740
    Patrick Kowalzick
    Mar 14, 2006
  4. Rob Meade
    Replies:
    6
    Views:
    472
    Rob Meade
    Mar 1, 2004
  5. http://ejobseek.com

    what are included in metacharacters for regex?

    http://ejobseek.com, Sep 1, 2003, in forum: Perl Misc
    Replies:
    6
    Views:
    294
    Anno Siegel
    Sep 2, 2003
  6. C. Colin Backslas
    Replies:
    1
    Views:
    313
    Anno Siegel
    Sep 14, 2005
  7. John Kelly

    piped open and shell metacharacters

    John Kelly, Jul 30, 2010, in forum: Perl Misc
    Replies:
    22
    Views:
    640
    Ilya Zakharevich
    Aug 3, 2010
  8. alex
    Replies:
    3
    Views:
    745
    Richard Cornford
    Dec 28, 2006
Loading...