-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.html
279 lines (255 loc) · 9.12 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rego - A Go regular expression tester</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Rego - A Go regular expression tester">
<meta name="author" content="Steve Domin">
<!-- CSS -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
/* Sticky footer styles
-------------------------------------------------- */
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
/* Negative indent footer by it's height */
margin: 0 auto -60px;
}
/* Set the fixed height of the footer here */
#push,
#footer {
height: 60px;
}
#footer {
background-color: #f5f5f5;
}
/* Lastly, apply responsive CSS fixes as necessary */
@media (max-width: 767px) {
#footer {
margin-left: -20px;
margin-right: -20px;
padding-left: 20px;
padding-right: 20px;
}
}
.page-header {
margin-bottom: 20px;
}
</style>
<link href="assets/css/bootstrap-responsive.min.css" rel="stylesheet">
<!-- rego CSS -->
<link href="assets/css/rego.css" rel="stylesheet" media="screen">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Fav and touch icons -->
<link rel="shortcut icon" href="../assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
</head>
<body>
<!-- Part 1: Wrap all page content here -->
<div id="wrap">
<!-- Begin page content -->
<div class="container">
<div class="page-header">
<h1>Rego</h1>
A <a href="http://golang.org" target="_blank"/>Go</a> regular expression tester
</div>
<div class="row-fluid">
<form id="regexpForm" action="/test_regexp" method="POST" class="span6">
<label>Your regular expression :</label>
<input id="regexpInput" type="text" placeholder="r([a-z]+)go" value="r([a-z]+)go" />
<label>Test string :</label>
<textarea id="testStringInput" rows="5" cols="20" placeholder="rego">rego</textarea>
<label class="checkbox">
<input id="findAllSubmatchCheckbox" type="checkbox"> Find all submatch
</label>
<button id="clearAllFieldsButton" class="btn btn-warning" type="button">Clear all fields</button>
</form>
<form class="span6">
<label>Match :</label>
<div id="match" class="well">
</div>
<label>Match groups :</label>
<table id="matchGroupsTable" class="table table-bordered">
<thead>
<tr>
<th>#</th>
<th>Group Name</th>
<th>Group Match</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</form>
</div>
<div class="row-fluid">
<div id="quickref" class="well">
<h3>Go RegExp Quick Reference (<a href="http://rubular.com/" target="_blank">© Rubular</a>)</h3>
<div style="float:left">
<table>
<tbody>
<tr>
<td><code>[abc]</code></td>
<td>A single character of: a, b or c</td>
</tr>
<tr>
<td><code>[^abc]</code></td>
<td>Any single character except: a, b, or c</td>
</tr>
<tr>
<td><code>[a-z]</code></td>
<td>Any single character in the range a-z</td>
</tr>
<tr>
<td><code>[a-zA-Z]</code></td>
<td>Any single character in the range a-z or A-Z</td>
</tr>
<tr>
<td><code>^</code></td>
<td>Start of line</td>
</tr>
<tr>
<td><code>$</code></td>
<td>End of line</td>
</tr>
<tr>
<td><code>\A</code></td>
<td>Start of string</td>
</tr>
<tr>
<td><code>\z</code></td>
<td>End of string</td>
</tr>
</tbody>
</table>
</div>
<div style="float:left">
<table>
<tbody>
<tr>
<td><code>.</code></td>
<td>Any single character</td>
</tr>
<tr>
<td><code>\s</code></td>
<td>Any whitespace character</td>
</tr>
<tr>
<td><code>\S</code></td>
<td>Any non-whitespace character</td>
</tr>
<tr>
<td><code>\d</code></td>
<td>Any digit</td>
</tr>
<tr>
<td><code>\D</code></td>
<td>Any non-digit</td>
</tr>
<tr>
<td><code>\w</code></td>
<td>Any word character (letter, number, underscore)</td>
</tr>
<tr>
<td><code>\W</code></td>
<td>Any non-word character</td>
</tr>
<tr>
<td><code>\b</code></td>
<td>Any word boundary</td>
</tr>
</tbody>
</table>
</div>
<table>
<tbody>
<tr>
<td><code>(...)</code></td>
<td>Capture everything enclosed</td>
</tr>
<tr>
<td><code>(a|b)</code></td>
<td>a or b</td>
</tr>
<tr>
<td><code>a?</code></td>
<td>Zero or one of a</td>
</tr>
<tr>
<td><code>a*</code></td>
<td>Zero or more of a</td>
</tr>
<tr>
<td><code>a+</code></td>
<td>One or more of a</td>
</tr>
<tr>
<td><code>a{3}</code></td>
<td>Exactly 3 of a</td>
</tr>
<tr>
<td><code>a{3,}</code></td>
<td>3 or more of a</td>
</tr>
<tr>
<td><code>a{3,6}</code></td>
<td>Between 3 and 6 of a</td>
</tr>
</tbody>
</table>
<div id="quickrefFooter">
<p>
Full syntax reference at <a href="https://github.com/google/re2/wiki/Syntax" target="_blank">https://github.com/google/re2/wiki/Syntax</a>. Go RegExp doc at <a href="http://golang.org/pkg/regexp/" target="_blank">http://golang.org/pkg/regexp/</a>.
</p>
<!--
<p>
options:
<code>i</code> case insensitive
<code>m</code> make dot match newlines
<code>x</code> ignore whitespace in regex
<code>o</code> perform #{...} substitutions only once
</p>
-->
</div>
</div>
</div>
</div>
<div id="push"></div>
</div>
<div id="footer">
<div class="container">
<p class="muted credit">Built by <a href="https://github.com/stevedomin" target="_blank">Steve Domin</a>. Inspired by <a href="http://rubular.com/" target="_blank">Rubular</a>. You can find the sources at <a href="https://github.com/stevedomin/rego" target="_blank">github.com/stevedomin/rego</a>.</p>
</div>
</div>
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="assets/js/rego.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-36255462-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>