I need some assistance fixing my regular expression, which should match the following conditions:
s
and onlys
f
and onlyf
dn
and onlydn
- any one or two whole numbers in front of a d (
35d
for example) or any number with decimalsss
would be invalid,dnf
would be invalid,305d
would be invalid
Regular Expression:
^(s|f|dn)|(\d{2}d)$
gets me startedsf
matches, but it shouldn't.