regex pattern to match first 2 numbers in a string -


this question has answer here:

can 1 please

i need regex pattern check the first 2 numbers match either 01 or 02 or 03 or 07 only

^0[1237] 
  • ^ - start of string
  • 0 - zero
  • [1237] - character set matches 1 of listed

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -