Regular Expression Reference

1) Write a regular expression to match pattern in email.

e.g match -eu before @ in email.

Regex : /.*-eu@gmail.com/g

 

 

 

 

 

 

 

 

2) Meta Character Reference

Meta CharDefinitionPatternSample Matches
^Start of a string.^abcabc, abcdefg, abc123, ...
$End of a string.abc$abc, endsinabc, 123abc, ...
|Alternation.bill|tedted, bill
{...}Explicit quantifier notation.ab{2}cabbc
[...]Explicit set of characters to match.a[bB]cabc, aBc
(...)Logical grouping of part of an expression.(abc){2}abcabc
*0 or more of previous expression.ab*cac, abc, abbc, abbbc, ...
+1 or more of previous expression.ab+cabc, abbc, abbbc, ...
?0 or 1 of previous expression; also forces minimal matching when an expression might match several strings within a search string.ab?cac, abc
(Visited 72 times, 1 visits today)