#!/usr/bin/perl use warnings; use strict; my $content = 'Fields of activity: Legal basis:'; my $d_fieldofactivity = 'missing'; if ($content =~ /Fields \s of \s activity: (.*) Legal/xs) { $d_fieldofactivity = $1; } print "(( $d_fieldofactivity ))\n";
Output:
(( ))
In reply to Re: Regular expression with multiple lines
by choroba
in thread Regular expression with multiple lines
by PerlNovice999
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |