A single POSIX-Extended regex to match all shortest substrings that start with “a”, end with “b” and do not contain any element of the set of strings
Given a string, is it possible to write a single POSIX-Extended regular expression to match all shortest substrings that start with a
and end with b
, but do not contain cb
, cd
or fg
? I want to use such a regex with gensub
, match
or split
functions (in gawk
). For example,
Why does the “match” function not work in this particular situation?
I have the 57-byte text file (in UTF-8). It can be generated by the following command:
confirming/invalidating a few assumptions with different Awks/OSs
I’m trying to implement a robust ere_parenthesize function that requires to accurately parse the bracket expressions of a user-provided ERE.
conforting/invalidating a few assumptions with different Awks/OSs
I’m trying to implement a robust ere_parenthesize function that requires to accurately parse the bracket expressions of a user-provided ERE.
Need to check if my awk field starts with a /
Here is my command
How to correctly encapsulate any regex in parenthesis in `awk`
I would like to encapsulate a user-provided ERE in parenthesis while retaining its original meaning when I use it with awk’s match
, split
, sub
, etc… If you wonder why I need to do that then check here.