[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ?: in regular expressions.
From: |
Lawrence Velázquez |
Subject: |
Re: ?: in regular expressions. |
Date: |
Mon, 23 Aug 2021 17:46:52 -0400 |
User-agent: |
Cyrus-JMAP/3.5.0-alpha0-1118-g75eff666e5-fm-20210816.002-g75eff666 |
On Mon, Aug 23, 2021, at 5:36 PM, hancooper via wrote:
> Am trying to understand what `?:` does in regular expressions. What is
> it good for?
https://perldoc.perl.org/perlre#%28%3F%3Apattern%29
Note that '(?: ... )' doesn't mean anything special in POSIX BRE [1]
or ERE [2], which are the regular expression languages used by Bash
and typical Unix tools. So this is even more off-topic than usual.
[1]:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03
[2]:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04
--
vq