My intention is simply to have an operation that I can run on target strings (probably mostly code, maybe even a regex string that I want to interpret literally) so that I can use the result as a regex search string, meaning what it's supposed to.

I'm not sure that I actually need anything more than what I've already suggested, but maybe I'm missing something.

Rick Gordon

--------------------
On March 8, 2018 at 8:12:17 PM [-0800],
Tom Robinson wrote in an email entitled
"Re: Regex to Escape Regex Characters in Any String":
I suspect you’re opening a can of worms.  Can you not just turn of Grep search?

See 
https://stackoverflow.com/questions/399078/what-special-characters-must-be-escaped-in-regular-expressions

Escaping everything might be safe but hard to read — 
https://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions:

Like Perl, PCRE has consistent escaping rules: any non-alpha-numeric character 
may be escaped to mean its literal value by prefixing a backslash
___________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________
WWW: http://www.shelterpub.com

--
This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to