~sircmpwn/hare-users

4 3

Multiple Pipes in Regex

Details
Message ID
<IK2txae4LPU6_sJxOx-oiKfJIODuwl-ayG0mEnAGJjvCYN88XvpbOtAJNb2Od219OkxdNBNK2iNfm7Yri0-IRbRM2lAFxj61MdJWnpiTtVw=@protonmail.com>
DKIM signature
missing
Download raw message
Good day!

Is there anywhere I can read about limitations on Hare's standard regex
implementation, besides the docs and the blog post about it?

I want to check wherever using multiple alterations is allowed.  My
program aborts when I test again the regex "(a|b|c)", with the following
error:

Abort: /usr/src/hare/stdlib/regex/regex.ha:502:4: slice or array access
out of bounds


And compiling a regex from "a|b|c" returns this error description:

Encountered ")" token without matching "("


I couldn't find anything about several alterations in a row in the POSIX
spec linked in the blog.  It seems that Hare's regex does not support
it, but I just wanted to double check in case I am doing something
wrong.
Details
Message ID
<CQ262Z9B0JIP.1H3F7UZV1YWFZ@attila>
In-Reply-To
<IK2txae4LPU6_sJxOx-oiKfJIODuwl-ayG0mEnAGJjvCYN88XvpbOtAJNb2Od219OkxdNBNK2iNfm7Yri0-IRbRM2lAFxj61MdJWnpiTtVw=@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
You can take a look at https://todo.sr.ht/~sircmpwn/hare?search=regex

Particularly, at #696.
Details
Message ID
<CFCw_MOaKablG_1rdvQHtQpyx-316dp8cndc5BcT0UehadS-JkqdthGbbBrNIvTuz9AT_0EYw4pb2JQ0eQERLr7b5gW_lNihunQ1ndb0XKY=@protonmail.com>
In-Reply-To
<CQ262Z9B0JIP.1H3F7UZV1YWFZ@attila> (view parent)
DKIM signature
missing
Download raw message
Understood, thanks!
Details
Message ID
<CQ29XD60R7FA.2823AU7XGW8E8@ki>
In-Reply-To
<CFCw_MOaKablG_1rdvQHtQpyx-316dp8cndc5BcT0UehadS-JkqdthGbbBrNIvTuz9AT_0EYw4pb2JQ0eQERLr7b5gW_lNihunQ1ndb0XKY=@protonmail.com> (view parent)
DKIM signature
missing
Download raw message
Hi, sorry, this is something that I never got around to implementing.

It should be relatively easy, so if you, or anyone else, is looking for
a quick thing to add to regex::, this would be a good candidate. I'm
always available to help in #hare if you have any questions.

Otherwise, just wait and I or someone else will do it eventually.
Details
Message ID
<0xRUxq6dYpLSFr-bC3KxDp4I09WTWO_B46RLkeFYjKK7j5wRHly68AtwyA9Uj5w48xczxvOzPjXWR1ljzisIovQt5bPwdj_4TkllOnW1Yno=@protonmail.com>
In-Reply-To
<CQ29XD60R7FA.2823AU7XGW8E8@ki> (view parent)
DKIM signature
missing
Download raw message
Regex is an interesting topic!  I'll try to contribute it once I get
better at the language.
Reply to thread Export thread (mbox)