objective c - I need perticular regular expression for my data check -


i new in regular expression. have allow users input type of data.

  1. the string must start w or w.
  2. the string must have minimum 2 "/".
  3. the string must have character or number after /.
  4. after second / there should minimum 1 number.

please me out. stucking 2-3 hours.

how about:

^(?i)w[a-z0-9]*(?:/[a-z0-9]+)+/(?=.*\d+)[a-z0-9]*$ 

if want digits after last slash:

^(?i)w[a-z0-9]*(?:/[a-z0-9]+)+/\d+$ 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -