On Thu, 7 Dec 2000, Micah Cowan wrote:

> The backslashed-escaped characters {, }, (, and ) would all lose their
> special meanings in a regex.

Actually, it depends on the regex interpreter.  As I recall, in PERL, you
use (...) to represent a group of characters that need to be remembered
for later recalling.  Under sed, \(...\) is used to do the same.  (Perl
also uses $1 instead of \1 for recalling, doesn't it?)

If you don't put the backslashes in front of ( or ), you match the
parenthesis characters, I think.  The same *seems* to be true for curly
braces... on Sed, anyway.

-Mark (still a trial-and-error regex user...)

PS: Thank goodness for PHP...
PPS:

   SED: See smoke-emitting diode

   Smoke emitting diode: An incorrectly connected diode, probably a
      light-emitting diode, in the process of losing its "magic smoke"
      and becoming a "friode".

   (courtesy of Dictionary.com :)

---
Mark K. Kim
http://www.cbreak.org/mark/
PGP key available upon request.


Reply via email to