in reply to Please correct me in the above regular expression
See How to ask better questions using Test::More and sample data
use strict; use warnings; use Test::More tests => 1; my $in = "int abc;\n.abc(abc)"; my $want = ['abc', '.abc', '(abc']; my @have = $in =~ /([\.(]?abc)/g; is_deeply \@have, $want;
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |