I am trying to learn Regex
construction, and i am stuck in one problem.
Problem Statement: A regex that should match following phrases:
rap them
tapeth
apth
wrap/try
sap tray
87ap9th
apothecary
but should not match
aleht
happy them
tarpth
Apt
peth
tarreth
ddapdg
apples
shape the
My attempt:
^[a-z0-9]+p.?t
My regex is matching tarpth
as well. How can i fix it?