in reply to RegExp not working!

Your regex has entirely too many escapes... except where it needs them:
#!/usr/bin/perl use strict; use 5.016; # 1084488 my $line = '<td align="left"><b>A</b> - Tilt: 19&#176; - Segments: 1(7 +2-93)</td>'; if ($line =~ /<td align="left"><b>A<\/b>\s+-\s+Tilt:\s+\d+&#\d+;\s+-\s ++Segments:\s+(.*?)<\/td>/) { say 'yep, good match'; say $1; } else { say 'boo'; }

Note that the literal parentheses around the range 72-93 need to be escaped; otherwise they set up a capture. Conversely, you need to parenthesize the whole regex expression (i.e., between the regex delimiters) to capture, as you asked, the whole line... or, if you don't want the html (your OP indicated that's the case) put pairs of capturing parentheses around what you do want (to skip over the closing </b> and to eliminate the closing </td>) in which case, your <c>.+?<c> to match the segment value will need to be more specific or otherwise modified.

Updated by putting that last para, that got lost somewhere :-(, back in the node, and adding the observation re skipping the html.


Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
  1. code
  2. verbatim error and/or warning messages
  3. a coherent explanation of what "doesn't work actually means.

check Ln42!