Please support RegExLib Sponsors
.NET Engine Client-side Engine Silverlight Tester
Source Regular Expression # Greedy, no-backtracking and only named groups capture. (?n) ^ ( (?'allowDay'Sun|Mon|Fri) | (Sat # if we match 'ur' then constrain # the next char with a lookahead # for 'd' so that we don't match on # Satur. (?'allowDay'ur(?=d))? ) | ( ( ( T ( # Accepts "Tu.", "Tue." ue? | # Accepts "Th.", "Thu." or "Thur." h(ur?)? ) ) | ( Wed # if "ne" matched then constrain # the next chars with a lookahead # for 'sd' so that we don't match on # Wedne. (ne(?=sd))? ) ) ( # If 'Tue' or 'Thur' or 'Wedne' matched # then match 's' in the "allowDay" Group. (?<=(e|r)) (?'allowDay's) )? ) ) # Optional ending match of "day" or "." ( # if Group[allowDay] succeeded then allow # the letters "day" or a full-stop. If it # did not succeed, a full-stop is required. (?(allowDay)day)|\. )? $
Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials