0

I want to implement this pattern to only accept one letter, being the possibilities: "M,m,F or f". I tried writing this: pattern="[M][m][F][f]{1}".

2 Answers2

0

Try this

pattern="[MmFf]"
Rob Kwasowski
  • 2,580
  • 3
  • 10
  • 31
0

“[abc]” Matches only a single character from set of given characters. so you need [MmFf]

Ahmed Eid
  • 134
  • 5