* Regex Rules
@ 2022-11-10 2:04 jgart
2022-11-10 6:37 ` Julien Lepiller
0 siblings, 1 reply; 6+ messages in thread
From: jgart @ 2022-11-10 2:04 UTC (permalink / raw)
To: Guix Help
Hi,
Where can I find all the regex rules for this style of regex?
"\\$\\{PG_SHAREDIR\\}/extension"
That's a snippet I took at random from guix/
all best,
jgart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regex Rules
2022-11-10 2:04 Regex Rules jgart
@ 2022-11-10 6:37 ` Julien Lepiller
2022-11-10 19:19 ` jgart
0 siblings, 1 reply; 6+ messages in thread
From: Julien Lepiller @ 2022-11-10 6:37 UTC (permalink / raw)
To: help-guix, jgart
\\ is for inputing a single \ (it needs to be etcaped in guile strings). Then, the rest is a Guile regexp, wgicg you can liarn about at https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions.html.
The manual says it's POSIX regexp, whatever that means :)
Le 10 novembre 2022 03:04:12 GMT+01:00, jgart <jgart@dismail.de> a écrit :
>Hi,
>
>Where can I find all the regex rules for this style of regex?
>
>"\\$\\{PG_SHAREDIR\\}/extension"
>
>That's a snippet I took at random from guix/
>
>all best,
>
>jgart
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regex Rules
2022-11-10 6:37 ` Julien Lepiller
@ 2022-11-10 19:19 ` jgart
2022-11-10 19:33 ` Tobias Geerinckx-Rice
0 siblings, 1 reply; 6+ messages in thread
From: jgart @ 2022-11-10 19:19 UTC (permalink / raw)
To: Julien Lepiller; +Cc: help-guix
On Thu, 10 Nov 2022 07:37:00 +0100 Julien Lepiller <julien@lepiller.eu> wrote:
> \\ is for inputing a single \ (it needs to be etcaped in guile strings). Then, the rest is a Guile regexp, wgicg you can liarn about at https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions.html.
>
> The manual says it's POSIX regexp, whatever that means :)
I'm familiar with posix regex from using vis:
https://github.com/martanne/vis
But, iirc vis regex are different from Guile's
I might be wrong on that.
I'll have to check the parity between the two
thanks,
jgart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regex Rules
2022-11-10 19:19 ` jgart
@ 2022-11-10 19:33 ` Tobias Geerinckx-Rice
2022-11-10 19:49 ` Felix Lechner via
0 siblings, 1 reply; 6+ messages in thread
From: Tobias Geerinckx-Rice @ 2022-11-10 19:33 UTC (permalink / raw)
To: jgart; +Cc: Julien Lepiller, help-guix
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
I recommend starting with the regex(7) man page, before comparing
any implementation to another.
> But, iirc vis regex are different from Guile's
> I might be wrong on that.
‘By default, Guile supports POSIX extended regular expressions.’ —
(guile)Regexp Functions
‘[vis] uses what POSIX refers to as “Extended Regular
Expressions”’ — vis(1)
Kind regards,
T G-R
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regex Rules
2022-11-10 19:33 ` Tobias Geerinckx-Rice
@ 2022-11-10 19:49 ` Felix Lechner via
0 siblings, 0 replies; 6+ messages in thread
From: Felix Lechner via @ 2022-11-10 19:49 UTC (permalink / raw)
To: Tobias Geerinckx-Rice; +Cc: jgart, Julien Lepiller, help-guix
Hi,
On Thu, Nov 10, 2022 at 11:39 AM Tobias Geerinckx-Rice <me@tobias.gr> wrote:
>
> ‘By default, Guile supports POSIX extended regular expressions.’ —
Yes, the word "extended" is often omitted. A good summary is here. [1]
POSIX adopted some, but not all, of the Perl Compatible Regular
Expressions (PCRE), which are more powerful but older. From the 'grep'
manual page (see the -E switch): "In basic regular expressions the
meta-characters ?, +, {, |, (, and ) lose their special meaning".
Kind regards
Felix Lechner
[1] https://en.wikibooks.org/wiki/Regular_Expressions/POSIX-Extended_Regular_Expressions
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Regex Rules
[not found] <mailman.75.1668099675.32456.help-guix@gnu.org>
@ 2022-11-11 3:54 ` Christopher Rodriguez
0 siblings, 0 replies; 6+ messages in thread
From: Christopher Rodriguez @ 2022-11-11 3:54 UTC (permalink / raw)
To: help-guix, julien, jgart
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
>> Where can I find all the regex rules for this style of regex?
> \\ is for inputing a single \ (it needs to be etcaped in guile
> strings). Then, the rest is a Guile regexp, wgicg you can liarn about
> at
> https://www.gnu.org/software/guile/manual/html_node/Regular-Expressions.html.
>
> The manual says it's POSIX regexp, whatever that means :)
My $0.02:
When I dove into it a while ago, I was able to make progress once I
realized Regexps in Guile conform to POSIX Extended Regular Expressions
[1], with the added caveat of having to escape them as strings [2].
[1]: https://www.regular-expressions.info/posix.html
[2]: https://www.gnu.org/software/guile/manual/html_node/String-Syntax.html
--
Christopher Rodriguez
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-11 15:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-10 2:04 Regex Rules jgart
2022-11-10 6:37 ` Julien Lepiller
2022-11-10 19:19 ` jgart
2022-11-10 19:33 ` Tobias Geerinckx-Rice
2022-11-10 19:49 ` Felix Lechner via
[not found] <mailman.75.1668099675.32456.help-guix@gnu.org>
2022-11-11 3:54 ` Christopher Rodriguez
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.