G'day Kallewirsch,

It would have been better had you provided all information up-front. From your responses to hippo and haukex, I've determined the following.

You're using WWW::Telegram::BotAPI. This is a front-end to "Telegram Bot API". It's sendMessage method documentation describes "HTML style". You should read that entire section; this extract highlights the main point that applies to you:

"... All <, > and & symbols ... must be replaced with the corresponding HTML entities ..."

From that, and based on what you've revealed so far, you need to modify $av_tmp_LINE before combining it with $av_tmp_STRING. Here's an example:

$ perl -e ' use 5.010; use strict; use warnings; my $av_tmp_LINE = "Jun 3 23:20:05 f42252s5 postfix/pickup[204714] +: E1E63A045C: uid=33 from=<www-data>"; say "BEFORE: $av_tmp_LINE"; $av_tmp_LINE =~ s/([&<>])/char_to_entity($1)/eg; say "AFTER: $av_tmp_LINE"; my $av_tmp_STRING = "Logfile: " . "<strong>" . q{$av_obj_TMP->{inp +ut}} . "</strong>" . " " . $av_tmp_LINE; say "\$av_tmp_STRING[$av_tmp_STRING]"; sub char_to_entity { my ($char) = @_; state $entity_for = {qw{& &amp; < &lt; > &gt;}}; return $entity_for->{$char}; } ' BEFORE: Jun 3 23:20:05 f42252s5 postfix/pickup[204714]: E1E63A045C: u +id=33 from=<www-data> AFTER: Jun 3 23:20:05 f42252s5 postfix/pickup[204714]: E1E63A045C: u +id=33 from=&lt;www-data&gt; $av_tmp_STRING[Logfile: <strong>$av_obj_TMP->{input}</strong> Jun 3 2 +3:20:05 f42252s5 postfix/pickup[204714]: E1E63A045C: uid=33 from=&lt; +www-data&gt;]

Note: I haven't tried to interpolate $av_obj_TMP->{input} as I've no idea what its value is.

— Ken


In reply to Re: perlre inverse check for several patterns by kcott
in thread perlre inverse check for several patterns by averlon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.