- or download this
if ('foo 123 bar' =~ /(\d+)/) {
print("$1\n");
}
- or download this
123
- or download this
for (1..2) {
if ('ab' =~ /a/g) {
...
print("no match\n");
}
}
- or download this
match
no match
- or download this
for (1..2) {
if ('ab' =~ /a/) {
...
print("no match\n");
}
}
- or download this
match
match