Tuesday, 7 July 2015

Test your Regix exprestion in easy way

During our work you have to write regex expression and test it

and it's confusing and consuming a lot of times

I found this useful website that help in


Example


if you want to make sure the input is :

  • ^[a-zA-Z ]+$ String and space
  • ^[a-zA-Z]+$ string only
I will select String and space 
kindly follow the steps below :


  1. go to website http://regexr.com/
  2. write the ^[a-zA-Z ]+$ in  expectation 
  3. write the free testing text in TEXT
  4. check matching (en the end of expression ) 

once the letter is blue --> its matching (image1)
if there is no shadow -->it's not matching  (image2)


image 1 - the text match the expression
image 2- text not matching the regex

No comments:

Post a Comment