-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
213 lines (184 loc) · 12.9 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>JavaScript Regular expressions test and debug</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/site.css" />
<script type="text/javascript" src="js/regexter.js"></script>
</head>
<body>
<h1 id="logo">Regexter.com <span class="beta">BETA</span></h1>
<p class="slogan">JavaScript RegExp test and debug<br />achieved with <a href="http://code.google.com/p/besen/">BESEN</a></p>
<form action="" method="post" onsubmit="return false;">
<table class="regex-pane" cellspacing="0" cellpadding="0">
<tr>
<td class="regex-label"><strong>re</strong></td>
<td>
<input id="regex-field" type="text" name="regex" />
</td>
</tr>
<tr>
<td class="regex-label"><strong>flags</strong></td>
<td>
<input type="checkbox" name="ignorecase" id="case-insensitive" />
<label for="case-insensitive">Ignore case</label>
<input type="checkbox" name="global" id="global-search" />
<label for="global-search">Global search</label>
<input type="checkbox" name="multiline" id="multiline-search" />
<label for="multiline-search">Multiline</label>
<span id="regex-error" class="error-msg"></span>
</td>
</tr>
<tr>
<td class="regex-label val_t"><strong>data</strong></td>
<td>
<div class="smart-textarea">
<pre id="regex-data-pre"></pre>
<textarea id="regex-data" spellcheck="false" name="data" cols="50" rows="20"></textarea>
</div>
</td>
</tr>
<tr>
<td class="regex-label val_t"><strong>debug</strong></td>
<td>
<div id="debug-holder">
<pre>Not available</pre>
</div>
</td>
</tr>
<tr>
<td class="regex-label val_t"><a href="#permalink" class="hide" onclick="return regexter.showHide(this, 'permalink');">permalink</a></td>
<td>
<div style="display: none;" id="permalink"></div>
</td>
</tr>
<tr>
<td class="regex-label val_t"><a href="#man" class="hide" onclick="return regexter.showHide(this, 'man');">man</a></td>
<td>
<div style="display: none;" id="man">
<table class="reference-tbl" cellspacing="0" summary="Regular expressions reference">
<tbody>
<tr>
<td><code>.</code></td>
<td>Any character except newline.</td>
</tr>
<tr class="altBg">
<td><code>\.</code></td>
<td>A period (and so on for <code>\*</code>, <code>\(</code>, <code>\\</code>, etc.)</td>
</tr>
<tr>
<td><code>^</code></td>
<td>The start of the string.</td>
</tr>
<tr class="altBg">
<td><code>$</code></td>
<td>The end of the string.</td>
</tr>
<tr>
<td><code>\d</code>,<code>\w</code>,<code>\s</code></td>
<td>A digit, word character <code>[A-Za-z0-9_]</code>, or whitespace.</td>
</tr>
<tr class="altBg">
<td><code>\D</code>,<code>\W</code>,<code>\S</code></td>
<td>Anything except a digit, word character, or whitespace.</td>
</tr>
<tr>
<td><code>[abc]</code></td>
<td>Character a, b, or c.</td>
</tr>
<tr class="altBg">
<td><code>[a-z]</code></td>
<td>a through z.</td>
</tr>
<tr>
<td><code>[^abc]</code></td>
<td>Any character except a, b, or c.</td>
</tr>
<tr class="altBg">
<td><code>aa|bb</code></td>
<td>Either aa or bb.</td>
</tr>
<tr>
<td><code>?</code></td>
<td>Zero or one of the preceding element.</td>
</tr>
<tr class="altBg">
<td><code>*</code></td>
<td>Zero or more of the preceding element.</td>
</tr>
<tr>
<td><code>+</code></td>
<td>One or more of the preceding element.</td>
</tr>
<tr class="altBg">
<td><code>{<em>n</em>}</code></td>
<td>Exactly <em>n</em> of the preceding element.</td>
</tr>
<tr>
<td><code>{<em>n</em>,}</code></td>
<td><em>n</em> or more of the preceding element.</td>
</tr>
<tr class="altBg">
<td><code>{<em>m</em>,<em>n</em>}</code></td>
<td>Between <em>m</em> and <em>n</em> of the preceding element.</td>
</tr>
<tr>
<td><code>??</code>,<code>*?</code>,<code>+?</code>,<br/><code>{<em>n</em>}?</code>, etc.</td>
<td>Same as above, but as few as possible.</td>
</tr>
<tr class="altBg">
<td><code>(</code><em>expr</em><code>)</code></td>
<td>Capture <em>expr</em> for use with <code>\1</code>, etc.</td>
</tr>
<tr>
<td><code>(?:</code><em>expr</em><code>)</code></td>
<td>Non-capturing group.</td>
</tr>
<tr class="altBg">
<td><code>(?=</code><em>expr</em><code>)</code></td>
<td>Followed by <em>expr</em>.</td>
</tr>
<tr>
<td><code>(?!</code><em>expr</em><code>)</code></td>
<td>Not followed by <em>expr</em>.</td>
</tr>
</tbody>
</table>
<p><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp#Special_characters_in_regular_expressions">Near-complete reference</a></p>
</div>
</td>
</tr>
<tr>
<td class="regex-label val_t"><strong>credits</strong></td>
<td>
<div id="credits">
<ul>
<li>Reference table in man section by <a href="http://regexpal.com/">RegexPal</a> and <a href="http://osteele.com/tools/rework/">reWork</a> by Oliver Steele</li>
<li>Debug mode is inspired by <a href="http://www.regexbuddy.com/">RegexBuddy</a></li>
</ul>
</div>
</td>
</tr>
<tr>
<td class="regex-label val_t"><strong>license</strong></td>
<td>LGPL 2013, <a href="http://twitter.com/abozhilov">@abozhilov</a></td>
</tr>
<tr>
<td class="regex-label val_t"><strong>github</strong></td>
<td><a href="https://github.com/abozhilov/regexter.com">https://github.com/abozhilov/regexter.com</a></td>
</tr>
</table>
</form>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26447684-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>