Re: regexp: how to find square-bracket (literal)? ~s "\[foo\]" doesn't work.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Wed 27 Jul 2005 at 15:45:29 -0400, David Combs wrote:
> Any idea how to find a literal square-bracket?

Usual regexps don't need a backslash in front of a closing ], since it
does not belong to an opening [. Also, between [ and ] a backslash is
just a backslash. If you want to include a ] inside [] it should be
first, since an empty range is quite useless so you get []] which should
also work. (Note I haven't tried this specifically with trn)

> David
___ Olaf 'Rhialto' Seibert      -- You author it, and I'll reader it.
\X/ rhialto/at/        -- Cetero censeo "authored" delendum esse.

SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement *

[Index of Archives]     [Photo]     [Yosemite]     [Epson Inkjet]     [Mhonarc]     [Nntpcache]

  Powered by Linux