5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6
6
< title > RegexLab - Interactive Regex Testing Tool</ title >
7
7
< link rel ="stylesheet " href ="styles.css ">
8
+ < link rel ="stylesheet " href ="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css ">
8
9
</ head >
9
10
< body >
10
11
< div class ="container ">
11
- < h1 > RegexLab</ h1 >
12
+ < header >
13
+ < h1 >
14
+ < i class ="fas fa-code "> </ i > RegexLab < small > Regex Testing Companion</ small >
15
+ </ h1 >
16
+ </ header >
12
17
< div class ="card ">
13
18
< div class ="tabs ">
14
19
< div class ="tab-headers ">
15
- < button class ="tab-header active " data-tab ="test "> Test Regex</ button >
16
- < button class ="tab-header " data-tab ="builder "> Regex Builder</ button >
20
+ < button class ="tab-header active " data-tab ="test ">
21
+ < i class ="fas fa-search "> </ i > Test Regex </ button >
22
+ < button class ="tab-header " data-tab ="builder ">
23
+ < i class ="fas fa-puzzle-piece "> </ i > Regex Builder </ button >
24
+ < button class ="tab-header " data-tab ="reference ">
25
+ < i class ="fas fa-book "> </ i > Quick Reference </ button >
17
26
</ div >
18
27
< div class ="tab-content active " id ="test-tab ">
19
28
< div class ="input-group ">
20
- < label > Regular Expression</ label >
29
+ < label >
30
+ < i class ="fas fa-code "> </ i > Regular Expression </ label >
21
31
< div class ="input-wrapper ">
22
- < input type ="text " id ="regex-pattern " placeholder ="Enter regex pattern ">
23
- < select id ="regex-presets ">
24
- < option value =""> Presets</ option >
32
+ < input type ="text " id ="regex-pattern " placeholder ="Enter regex pattern " required >
33
+ < select id ="regex-presets " aria-label =" Regex Presets " >
34
+ < option value =""> Quick Presets</ option >
25
35
< option value ="email "> Email</ option >
26
36
< option value ="phone "> Phone Number</ option >
27
37
< option value ="url "> URL</ option >
@@ -30,25 +40,110 @@ <h1>RegexLab</h1>
30
40
</ div >
31
41
</ div >
32
42
< div class ="input-group ">
33
- < label > Regex Flags</ label >
43
+ < label >
44
+ < i class ="fas fa-flag "> </ i > Regex Flags </ label >
34
45
< input type ="text " id ="regex-flags " placeholder ="Optional flags (g, i, m) ">
35
46
</ div >
36
47
< div class ="input-group ">
37
- < label > Test String</ label >
38
- < input type ="text " id ="test-string " placeholder ="Enter text to match against ">
48
+ < label >
49
+ < i class ="fas fa-paragraph "> </ i > Test String </ label >
50
+ < input type ="text " id ="test-string " placeholder ="Enter text to match against " required >
39
51
</ div >
40
- < button id ="test-regex-btn " class ="primary-btn "> Test Regex</ button >
41
- < div id ="validation-error " class ="error-message "> </ div >
52
+ < button id ="test-regex-btn " class ="primary-btn ">
53
+ < i class ="fas fa-play "> </ i > Run Test </ button >
54
+ < div id ="validation-error " class ="error-message " aria-live ="polite "> </ div >
42
55
< div id ="matches-container " class ="matches-section ">
43
- < h3 > Matches:</ h3 >
56
+ < h3 >
57
+ < i class ="fas fa-list "> </ i > Matches:
58
+ </ h3 >
44
59
< div id ="matches-list "> </ div >
45
60
</ div >
46
61
</ div >
47
62
< div class ="tab-content " id ="builder-tab ">
48
- < div class ="coming-soon "> Regex Builder Coming Soon! </ div >
63
+ < div class ="regex-builder ">
64
+ < div class ="input-group ">
65
+ < label >
66
+ < i class ="fas fa-code "> </ i > Generated Regex </ label >
67
+ < input type ="text " id ="generated-regex " placeholder ="Your regex will appear here " readonly >
68
+ </ div >
69
+ < div class ="regex-builder-actions ">
70
+ < button id ="copy-regex-btn " class ="primary-btn ">
71
+ < i class ="fas fa-copy "> </ i > Copy Regex </ button >
72
+ < button id ="clear-regex-btn " class ="primary-btn ">
73
+ < i class ="fas fa-trash "> </ i > Clear </ button >
74
+ < button id ="show-repeat-modal " class ="primary-btn ">
75
+ < i class ="fas fa-redo "> </ i > Repeat </ button >
76
+ </ div >
77
+ < div class ="builder-category ">
78
+ < h4 >
79
+ < i class ="fas fa-font "> </ i > Character Classes
80
+ </ h4 >
81
+ < div id ="character-classes " class ="builder-options-grid "> </ div >
82
+ </ div >
83
+ < div class ="custom-char-class ">
84
+ < input type ="text " id ="custom-char-class " placeholder ="Enter custom character class (e.g., a-zA-Z) ">
85
+ < button id ="custom-char-class-btn " class ="primary-btn "> Add</ button >
86
+ </ div >
87
+ < div class ="builder-category ">
88
+ < h4 >
89
+ < i class ="fas fa-ruler "> </ i > Quantifiers
90
+ </ h4 >
91
+ < div id ="quantifiers " class ="builder-options-grid "> </ div >
92
+ </ div >
93
+ < div class ="builder-category ">
94
+ < h4 >
95
+ < i class ="fas fa-anchor "> </ i > Anchors & Groups
96
+ </ h4 >
97
+ < div id ="anchors-groups " class ="builder-options-grid "> </ div >
98
+ </ div >
99
+ </ div >
100
+ </ div >
101
+ < div id ="repeat-modal " class ="repeat-modal ">
102
+ < div class ="repeat-modal-content ">
103
+ < h3 > Specify Repeat</ h3 >
104
+ < input type ="text " id ="repeat-input " placeholder ="Example: 3 or 2,4 ">
105
+ < button id ="repeat-confirm " class ="primary-btn "> Confirm</ button >
106
+ </ div >
107
+ </ div >
108
+ < div class ="tab-content " id ="reference-tab ">
109
+ < div class ="reference-content ">
110
+ < h3 >
111
+ < i class ="fas fa-book-open "> </ i > Regex Cheat Sheet
112
+ </ h3 >
113
+ < div class ="reference-grid ">
114
+ < div class ="reference-item ">
115
+ < strong > ^</ strong > Start of string
116
+ </ div >
117
+ < div class ="reference-item ">
118
+ < strong > $</ strong > End of string
119
+ </ div >
120
+ < div class ="reference-item ">
121
+ < strong > .</ strong > Any character
122
+ </ div >
123
+ < div class ="reference-item ">
124
+ < strong > *</ strong > 0 or more
125
+ </ div >
126
+ < div class ="reference-item ">
127
+ < strong > +</ strong > 1 or more
128
+ </ div >
129
+ < div class ="reference-item ">
130
+ < strong > ?</ strong > 0 or 1
131
+ </ div >
132
+ </ div >
133
+ </ div >
49
134
</ div >
50
135
</ div >
51
136
</ div >
137
+ < footer >
138
+ < p > Created with < i class ="fas fa-heart "> </ i > by ThatSINEWAVE </ p >
139
+ </ footer >
140
+ </ div >
141
+ < div id ="repeat-modal " class ="repeat-modal ">
142
+ < div class ="repeat-modal-content ">
143
+ < h3 > Specify Repeat</ h3 >
144
+ < input type ="text " id ="repeat-input " placeholder ="Example: 3 or 2,4 ">
145
+ < button id ="repeat-confirm " class ="primary-btn "> Confirm</ button >
146
+ </ div >
52
147
</ div >
53
148
< script src ="script.js "> </ script >
54
149
</ body >
0 commit comments