Re: [code] [textadept] Textadept 9 poll: Lua patterns or Regex?

From: Giovanni Salmeri <>
Date: Sun, 3 Jul 2016 06:06:32 +0200

Dear Mitchell

I for myself use a modified version of, so I would
welcome very much a regex engine in Textadept. In my opinion the
problem with Lua patterns is not the fact that they are limited (the
regex engine of Scintilla I use is much more limited), but simply the
fact that they are different from anything else I use (except,
obviously, Lua scripts themselves).

On a side note: I modified the above script in order to allow
substitutions like s/^/x/g or s/$/x/g (for adding x at the beginning or
at the end of a line), which is something I consider almost essential
but that I have found rather tricky to implement. Would the new solution
you are proposing allow this?

> Also, if Regex wins, I'll likely be removing the Lua code execution
> in pattern replacements (e.g. `%(string.upper('%1')`). In the very
> few instances I've actually used it, it's not as reliable as I'd
> expect it to be.

The same for me, with this syntax I managed more than once to stall
Textadept. On the other side, I would miss for example exactly
string.upper and string.lower, considering that TRE lacks the Vim-like
syntax \l \u \L \U \E. Perhaps Lua code execution could be kept as
a non-documented feature for the adventurous?

Thank you for your magnificent work!


Giovanni Salmeri
You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Sun 03 Jul 2016 - 00:06:32 EDT

This archive was generated by hypermail 2.2.0 : Sun 03 Jul 2016 - 06:53:00 EDT