split one line regex in a multiline regexp in perl
问题 I have trouble spliting my regex in multiple line. I want my regex to match the line given: * Code "l;k""dfsakd;.*[])_lkaDald" So I created this regex which work: my $firstRegexpr = qr/^\s*\*\s*Code\s+\"(?<Code>((\")*[^\"]+)+)\"/x; But now I want to split it in multiline like this(and want it to match the same thing!): my $firstRegexpr = qr/^\s*\*\s*Code\s+\" (?<Code>((\")*[^\"]+)+)\"/x; I read about this, but I have trouble using it: / ^\s*\*\s*Code\s+\" (?<Code>((\")*[^\"]+)+)\" /x My last