TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: MARTIN GREGORIE
from: MIKE SCOTT
date: 2020-03-19 17:03:00
subject: Re: Regexes and C

On 19/03/2020 14:12, Martin Gregorie wrote:
....
> Another annoyance with regcomp/regexec is that the common :alnum:
> abbreviation is *only* recognised if it occupies the whole set of
> alternates, i.e. [:alnum:] works, [.:alnum:_-] doesn't.

IMBW But these do indeed /only/ work inside a [...] construct so
shouldn't your examples read
[[:alnum:]]
and
[.[:alnum:]_-]

(see eg
https://perldoc.perl.org/perlrecharclass.html#Bracketed-Character-Classes
under 'POSIX character classes. Also eg
https://stackoverflow.com/questions/1085083/regular-expressions-in-c-examples
)




--
Mike Scott
Harlow, England

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.