Regex Samples: Difference between revisions

From HaFrWiki42
Jump to navigation Jump to search
Line 35: Line 35:
{| class="wikitableharmcenter" width="850"
{| class="wikitableharmcenter" width="850"
|-
|-
| [[File:Regex-23-001.png|thumb|center|750px| Email checker ]] <ref>[http://www.regular-expressions.info/email.html], This email checker is discussed on the page of Jan Goyvaerts.</ref>
| [[File:Regex-23-001.png|thumb|center|750px| Email checker ]] <ref>[http://www.regular-expressions.info/email.html Regular Expressions], This example of the email checker is discussed in more details on the webpage of Jan Goyvaerts.</ref>
|}
|}



Revision as of 12:24, 17 February 2015

Regex Samples Figures 1

Always be precise in the way you specify your data. The following question can be multiple interpreted.
Create a regular expression that matches the figures:

  • 1 - 49
  • 01 - 49

Of course the ^[0-4]?[0-9] is much too simple.

Matches correctly but recognize 11 first as 1 and 1
Matches correctly but recognize 11 first as 1 and 1
Matches correctly but recognize 51 as 5 and 1
Matches all correctly

Regex Samples Figures 1

Always be precise in the way you specify your data. The following question can be multiple interpreted.
Create a regular expression that matches the figures:

  • 25 - 67
Matches correctly 25 - 27 but only on one line
Matches correctly all figures 25 - 67

Regex Email Address

Always be precise in the way you specify your data. The following question can be multiple interpreted.
Create an email checker for input validation of an email.

Email checker
[1]

See also

top

Reference

top

  1. Regular Expressions, This example of the email checker is discussed in more details on the webpage of Jan Goyvaerts.