Neil and Mitchell,
On 3/26/07, Neil Hodgson <[EMAIL PROTECTED]> wrote:
george fotheringay:
> I'm using Lua to find occurrences of lines which begin with the
> character "[", via the call
> editor:findtext(pattern,SCIFIND_REGEXP,position),
> where pattern is the string "^\[".
Maybe you need to escape the '\': "^\\[".
Neil
To my complete amazement, "^\\[" worked. But I don't understand why.
I'm not trying to search for an occurrence of "\". "[" is a
metacharacter; therefore to search for it, it must be escaped. "\" is
the escape character. The documentation says that escape followed by
any character (other than some exceptions which do NOT include "[")
matches that character.
Both of you knew what to do-- can either of you explain this?
perplexed, GF
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest