Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zregexparse
- X-seq: zsh-users 22634
- From: Sebastian Gniazdowski <psprint@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: zregexparse
- Date: Wed, 29 Mar 2017 10:46:54 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hello,
I've stumbled upon zregexparse. Verified that it doesn't auto-load zsh/regex. Manual says:
zregexparse
This implements some internals of the _regex_arguments function.
Test V02 suggest this is a very capable tool. How it is compiled, with use of LGPL Gnu regex? I wonder what use cases might it have, this test:
zregexparse p1 p2 abcdef \( '/c?|?/' '{print $match[1]}' \) \#
print $? $p1 $p2
0:abcdef ( /c?|?/ {M1} ) #
>a
>b
>cd
>e
>f
>0 6 6
reveals that it can run code for every match. p1 and p2 aren't that clear. Has someone come across a practical use case for this call? It looks like it is safe to use, as it is tested and is not in module, and 4.3.17 has it..?
--
Sebastian Gniazdowski
psprint /at/ zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author