-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
156 lines (148 loc) · 6.19 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!--
RegexPal 0.1.4c (modified)
Modified version:
(c) 2011 lynda.com
Original version:
(c) 2007-2008 Steven Levithan <stevenlevithan.com>
GNU LGPL 3.0 license
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Regex Tester – RegexPal</title>
<link href="stylesheets/regexpal.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="header">
<img src="images/regexpal.gif" alt="RegexPal"/>
<h1><span class="t1">Regex</span><span class="t2">Pal</span>
<span id="version">0.1.4</span>
<span id="subtitle">— a JavaScript regular expression tester</span>
</h1>
</div>
<div id="options">
<ul>
<li><input id="flagG" type="checkbox" checked="checked"/><label for="flagG">Global</label> <span class="flag">(g)</span></li>
<li><input id="flagI" type="checkbox"/><label for="flagI">Case insensitive</label> <span class="flag">(i)</span></li>
<li><input id="flagM" type="checkbox"/><label for="flagM">Multiline anchors</label> <span class="flag">(m)</span></li>
<li><input id="flagS" type="checkbox"/><label for="flagS">Dot matches all</label> <span class="flag">(s)</span></li>
<li class="optGroup" id="quickReferenceDropdown">Quick Reference</li>
<li class="optGroup" id="optionsDropdown">Options
<ul>
<li><input id="highlightSyntax" type="checkbox" checked="checked"/><label for="highlightSyntax">Highlight regex syntax</label></li>
<li><input id="highlightMatches" type="checkbox" checked="checked"/><label for="highlightMatches">Highlight matches</label></li>
<li class="hidden"><input id="invertMatches" type="checkbox"/><label for="invertMatches" title="Match any text not matched by the regex">Invert results</label></li>
</ul>
</li>
</ul>
</div>
<div id="quickReference" class="hidden">
<h2>JavaScript Regex Quick Reference</h2>
<img src="images/pin.gif" class="pin" alt="pin" title="pin"/>
<img src="images/close.gif" class="close" alt="close" title="close"/>
<table 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 times 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>
</div>
<div id="body">
<div id="search" class="smartField">
<textarea cols="100" rows="3" tabindex="1" spellcheck="false">Enter regex here</textarea>
</div>
<div id="input" class="smartField">
<textarea cols="100" rows="10" tabindex="2" spellcheck="false">Enter test data here</textarea>
</div>
</div>
<div id="footer" class="small">
<p id="copyright">© 2010 <a href="http://blog.stevenlevithan.com">Steven Levithan</a> :: <a href="http://code.google.com/p/regexpal/">Google Code</a></p>
</div>
<script type="text/javascript" src="javascripts/xregexp.js"></script>
<script type="text/javascript" src="javascripts/helpers.js"></script>
<script type="text/javascript" src="javascripts/regexpal.js"></script>
</body>
</html>