This commit is contained in:
Zeeshan Ahmed 2017-07-23 09:02:04 +01:00
parent 78e39bc36f
commit 8701eba6bf

View File

@ -10,9 +10,9 @@ Imagine you are writing an application and you want to set the rules when user c
contains letter, number, underscore and hyphen. We also want to limit the number of characters in username so it does not look ugly.
We use the following regular expression to validate a username:
<center>
![Example](https://i.imgur.com/UrDb9qc.png)
</center>
<p style="text-align: center;">
![Regular expression](https://i.imgur.com/UrDb9qc.png)
</p>
Above regular expression can accepts the strings "john_doe", "jo-hn\_doe" and "john12\_as". It does not match "Jo" because that string
contains uppercase letter and also it is too short.