Date: Thu, 18 Jun 2020 12:25:46 -0400
On 18/06/2020 11.23, Corentin Jabot wrote:
> I'm puzzled by your use case. How often do you use a regex to find
> identifiers?
Often, possibly as often as "daily". Certainly when I want to apply code
transformations.
> And which tools do that?
"Do that" is ambiguous, so I'll address both possibilities.
Q. What tools do I use to find idenifiers using regular expressions?
A. My text editor. Grep (both 'plain' and 'git grep').
Q. What tools use '[[:alnum:]]'¹ to detect identifiers?
A. My text editor (syntax highlighting). Source formatters. Really, the
short answer is "most code lexers aside from actual compilers".
(¹ Probably not as regular expressions, but rather via character by
character parsing using something like `isalnum`.)
> I'm puzzled by your use case. How often do you use a regex to find
> identifiers?
Often, possibly as often as "daily". Certainly when I want to apply code
transformations.
> And which tools do that?
"Do that" is ambiguous, so I'll address both possibilities.
Q. What tools do I use to find idenifiers using regular expressions?
A. My text editor. Grep (both 'plain' and 'git grep').
Q. What tools use '[[:alnum:]]'¹ to detect identifiers?
A. My text editor (syntax highlighting). Source formatters. Really, the
short answer is "most code lexers aside from actual compilers".
(¹ Probably not as regular expressions, but rather via character by
character parsing using something like `isalnum`.)
-- Matthew
Received on 2020-06-18 11:29:38