pm5 has asked for the wisdom of the Perl Monks concerning the following question:

Recently I've found several bugs in my system in development that are related to hidden regexps in a string. In these works coping with big5 environment, often there comes data strings that includeds regexp operators: '|', '\', etc. Once I s/// they first, the bugs are vaporized.

I prepare to delegate these work-outs to a module so that further refinements can be aggregated. But first I'd like to know is there any other way to do this? As I haven't catched up with developments in locale yet, I don't know if this issue will be epitaph by 5.8. And I've check several modules related to string escaping in my memory, but they all emits code in particular format, ex. URI, Base64, instead of the desired '\|', '\\' construct.

Some guidence is appreciated. Thanks in advanced.

Replies are listed 'Best First'.
Re: Make a string regexp-safe
by stefp (Vicar) on Jul 14, 2002 at 15:56 UTC
    A reply falls below the community's threshold of quality. You may see it by logging in.