averlon has asked for the wisdom of the Perl Monks concerning the following question:
I have the following string as an example
xxx<pre>xxx<www>xxx<strong>xxxIn my case "pre" is allowed and "strong" as well. But "www" is not allowed.
I have tried just for test to finde one exception with:
<(?!strong)>But did not bring a hit!
At least I need to define in the regex all allowed patterns (there are not many in my case) and it should bring a hit if some not allowed pattern is found
Can someone help me on this?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perlre inverse check for several patterns
by hv (Prior) on Jun 02, 2023 at 15:36 UTC | |
|
Re: perlre inverse check for several patterns
by tybalt89 (Monsignor) on Jun 02, 2023 at 17:22 UTC | |
|
Re: perlre inverse check for several patterns
by hippo (Archbishop) on Jun 02, 2023 at 14:22 UTC | |
by averlon (Sexton) on Jun 02, 2023 at 14:47 UTC | |
by haukex (Archbishop) on Jun 03, 2023 at 07:48 UTC | |
by averlon (Sexton) on Jun 04, 2023 at 07:14 UTC | |
by averlon (Sexton) on Jun 05, 2023 at 08:37 UTC | |
by LanX (Saint) on Jun 05, 2023 at 12:51 UTC | |
|
Re: perlre inverse check for several patterns
by haukex (Archbishop) on Jun 02, 2023 at 14:35 UTC | |
|
Re: perlre inverse check for several patterns
by kcott (Archbishop) on Jun 04, 2023 at 11:41 UTC |