Re: [code] [textadept] Search and replace by regex

From: Mitchell <m.att.foicica.com>
Date: Fri, 31 Jan 2020 11:37:44 -0500 (EST)

Hi Lukas,

On Fri, 31 Jan 2020, Procházka Lukáš Ing. wrote:

> Hi Michell,
>
> On Fri, 31 Jan 2020 16:47:36 +0100, Mitchell <m.att.foicica.com> wrote:
>
>> Hi Lukas,
>>
>> On Fri, 31 Jan 2020, Procházka Lukáš Ing. wrote:
>>
>>> Hello,
>>>
>>> suppose having buffer with:
>>>
>>> ----
>>> abcd v ghij
>>> abcd v ghij
>>> abcd v ghij
>>> ----
>>>
>>> and regex to be found: " ([v]) +(%w)"
>>>
>>> TA (10.8) doesn't find anything, although IMHO it should do (should be " v
>>> g"
>>> three times).
>>>
>>> What am I doing wrong?
>>
>> Try \w instead of %w. I mix up regex with Lua patterns all the time :)
>
> OK - so TA regex engine is Lua? With substitution '\' for '%' at any place of
> usage?

Textadept's regex and Lua patterns are completely separate. Textadept used to use Lua patterns for searching, but more people are familiar with regex, so Lua patterns were replaced with a more or less full-featured regex engine.

I hope this helps clear up any confusion.

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 31 Jan 2020 - 11:37:44 EST

This archive was generated by hypermail 2.2.0 : Sat 01 Feb 2020 - 06:52:12 EST