in reply to Re: perlre inverse check for several patterns
in thread perlre inverse check for several patterns
Hi hippo!
no, it is not HTML. It is some interface using some formatting strings like (!!like!!) HTML. But unfotunately the interface crashes if some "<>" strings are included which do not match the allowed formatting strings.
The strings I process are lines from logfiles. Unfortunately some of these lines include "<xxx>" strings. This brings the interface I use into trouble. So I need to filter them out.
I meanwhile found out I get a "true" if I use the following code:
$av_tmp_STRING = "xxx<pre>xxx<www>xxx<strong>xxx"; if ( $av_tmp_STRING =~ m/<(?!strong>)(?!pre)/ ) { #do something with the string which contains wrong patterns }
Still testing if it really works
But anyhow. I will keep the example in mind for other use!
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perlre inverse check for several patterns
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 | |
|
Re^3: perlre inverse check for several patterns
by LanX (Saint) on Jun 05, 2023 at 12:51 UTC |