Re: regexp pipe problems..
- From: Tad McClellan <tadmc@xxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 06:23:56 -0500
Christian Winter <thepoet_nospam@xxxxxxxx> wrote:
> So to work around this the easiest solution would be to
> move the hostname pattern outside of the or-clause:
> m{
> ([^/]+)\.(site1|site2|site3)\.org
> /slash/slashey2/
> ( [^/]+ ) / ( \d+ ) / ( \d+ ) / ( [0-9a-zA-Z-]+ )
> }x;
>
> and to change the print statement (or whatever uses the
> captering variables) to ignore $2:
It is probably better to use the non-capturing form of parenthesis,
(?: ... ), for parens # 2:
m{
([^/]+)\. (?: site1|site2|site3 ) \.org
--
Tad McClellan SGML consulting
tadmc@xxxxxxxxxxxxxx Perl programming
Fort Worth, Texas
.
- References:
- regexp pipe problems..
- From: willwade
- Re: regexp pipe problems..
- From: Christian Winter
- regexp pipe problems..
- Prev by Date: Re: Checking IP addresses against lists of IPs, partial IPs, and netmasks.
- Next by Date: Re: SOAP::Lite proxied
- Previous by thread: Re: regexp pipe problems..
- Next by thread: Copy local Groups -- Get SID
- Index(es):