11.15. Grouping, alternatives

Bonus: all the words with either 'aba' or 'ada' in them
Bonus: all the words with either 'aba' or 'eda' in them

/a[bd]a/

if ($line =~ /aba/  or $line =~ /eda/) {
}
if ($line =~ /aba|eda/) {
}
if ($line =~ /(ab|ed)a/) {
}

If you are interested in on-site trainings by the author, please contact me directly.

Online courses:

Would you like to get
updated when I publish
the next article?

Follow me:

Google Plus Twitter RSS feed