[PATCH v2 00/12] regex patches
Rasmus Villemoes
ravi at prevas.dk
Tue May 13 10:40:22 CEST 2025
This started as a rather simple patch, 1/12, adding the ability to
more conveniently do regex matching in shell.
But with that, it became very easy to see what the slre library can
and especially what it cannot do, and that way I found both outright
bugs and a "wow, doesn't it support that syntax" gotcha. I couldn't
find any tests ('git grep slre -- test/' was empty), so I added a
small test suite and tweaked slre.c.
v2:
- Patch 12/12 was sent separately previously; now it's properly
included here with Quentin's suggestions folded in.
- Patches 1-11 are unchanged from v1, other than including Simon's and
Tom's R-bs.
Rasmus Villemoes (12):
cmd: test: add support for =~ operator
slre: add myself as maintainer
test: slre: add tests for regex library
slre: drop wrong "anchored" optimization
test: slre: add more test cases
test: slre: add some (negative) character class tests
slre: refactor is_any_but()
slre: fix matching of escape sequence used inside character class
test: slre: add test cases for escape char in character class
slre: implement support for ranges in character classes
test: slre: add tests for character ranges
doc: document test command
MAINTAINERS | 7 +++
cmd/test.c | 19 +++++++
doc/usage/cmd/setexpr.rst | 5 +-
doc/usage/cmd/test.rst | 102 ++++++++++++++++++++++++++++++++++++++
doc/usage/index.rst | 1 +
include/slre.h | 1 -
lib/slre.c | 78 +++++++++++++++++++----------
test/lib/Makefile | 1 +
test/lib/slre.c | 58 ++++++++++++++++++++++
9 files changed, 244 insertions(+), 28 deletions(-)
create mode 100644 doc/usage/cmd/test.rst
create mode 100644 test/lib/slre.c
--
2.49.0
More information about the U-Boot
mailing list