Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Regular expression with multiple lines

by choroba (Cardinal)
on Sep 25, 2013 at 08:25 UTC ( [id://1055633]=note: print w/replies, xml ) Need Help??


in reply to Regular expression with multiple lines

There must be something else going on. I tested your second code and it works for me:
#!/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:

(( ))
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1055633]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-19 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found