RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 2
Title Test Details Days in a Class Schedule
Expression
^M{0,1}T{0,1}W{0,1}(TH){0,1}F{0,1}S{0,1}(SU){0,1}$
Description
Matches a string if it is valid in the form of MWF or TTHS. Maybe used for validating the "days part" of a class schedule field. The string should only accept any of the ff set of letters: 'M' 'T' 'W' 'TH' 'F' 'S' 'SU' . Only one instance of these set of letters is accepted.
Matches
MWF | TTHS | MT | WFS | MFSU
Non-Matches
MM | WM | FTH | SM
Author Rating: Not yet rated. rodel surat
Title Test Details 12-hr Time
Expression
^(([0][0-9]|[1][0-2])|[0-9]):([0-5][0-9])( *)((AM|PM)|(A|P))$
Description
Matches a string if it is a valid time in the format of "HH:MM AM" or "HH:MM A".
Matches
1:30 AM | 01:20 AM | 10:00A | 11:50P
Non-Matches
13:00 A | 01:5 AM
Author Rating: The rating for this expression. rodel surat
   Displaying page 1 of 1 pages; Items 1 to 2

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials