PageSourceSearch

https://rubular.com/

html rubular.com collected 2026-10-02 07:17:48 UTC 8,073 bytes, 245 lines download raw bytes

1<!DOCTYPE html>
2<html lang="en">
3  <head>
4    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5    <meta name="viewport" content="width=device-width, initial-scale=1">
6  		<title>Rubular: a Ruby regular expression editor</title>
7  	<meta name="keywords" content="regular expression, regex, regexp, ruby, rails, programming, development, editor, tester, tool" />
8    <meta name="description" content="Ruby-based regular expression editor/tester">
9    <meta property="og:type" content="website">
10    <meta property="og:title" content="Rubular">
11    <meta property="og:description" content="Ruby-based regular expression editor/tester">
12    <meta property="og:image" content="https://rubular.com/assets/rubular_og-4948f7355b502d134c18e9fade5bc2e39c3a343ae818f2f5bdf922d8dc9bd919.png">
13    <meta property="og:url" content="https://rubular.com">
14    <meta name="twitter:card" content="summary_large_image">
15    <link rel="shortcut icon" href="/assets/favicon-45ccd548f76f6c2960ad6ce6128b6c245937e2219e6fab4d1fa61bb33616961c.ico">
16
17    <link rel="preconnect" href="https://srv.buysellads.com">
18    <link rel="preconnect" href="https://ssl.google-analytics.com">
19
20    <link rel="stylesheet" media="screen" href="/assets/application-d8362d0ee06566a697ed829099565b61f9af6eb65ca0cc0c71d3dd15b761ac22.css" />
21  </head>
22  <body>
23
24    <div id="main">
25
26      <h1><a href="/">Rubular</a></h1>
27      <h2>a Ruby regular expression editor</h2>
28
29      <div id="inner">
30
31        <div id="ajax_loader_wrapper" style="display:none"><img alt="Loading..." src="/assets/ajax-loader-3f3c13d972c1f87802b643db53e115718090a72652493c3788d1e031f6d2de57.gif" /></div>
32
33				<div id="form_wrapper">
34        <form id="test_form" action="/regex/do_test" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" />
35          <label id="regex_label" for="regex">Your regular expression:</label><br>
36
37          <span class="slash">/</span><textarea name="regex" id="regex" cols="80" rows="1">
38</textarea><span class="slash">/</span><input type="text" name="options" id="options" aria-label="Regex options" /><br>
39
40          <div id="test_and_result">
41            <div id="test_string">
42
43              <div id="inner_test_string_wrapper">
44                <label id="test_label" for="test">Your test string:</label>
45                <textarea name="test" id="test" cols="56" rows="10">
46</textarea>
47
48  							<span id="test_settings">
49  								<label>Wrap words <input type="checkbox" name="word_wrap" id="word_wrap" value="1" checked="checked" /></label>
50  								<label>Show invisibles <input type="checkbox" name="show_invisibles" id="show_invisibles" value="1" /></label>
51  							</span>
52
53              </div>
54            </div>
55
56            <div id="result"><div class="notice" id="start_instructions">
57Rubular is a Ruby-based regular expression editor. It's a handy way to test regular expressions as you write them.<br><br>
58
59To start, enter a regular expression and a test string. Or you can <a href="#" onclick="Rubular.example(); return false;">try an example</a>.
60</div></div>
61          </div>
62
63</form>				</div>
64
65				<div id="ajax_note" style="display:none"></div>
66
67				<div class="form_controls">
68					<a href="#" onclick="Rubular.makePermalink(); return false;">make permalink</a>
69        	<a href="#" onclick="Rubular.clearFields(); return false;">clear fields</a>
70				</div>
71
72      </div>
73
74      <h3>Regex quick reference</h3>
75
76<div id="quickref">
77
78  <div style="float:left">
79
80    <table>
81      <tr>
82        <td><code>[abc]</code></td>
83        <td>A single character of: a, b, or c</td>
84      </tr>
85      <tr>
86        <td><code>[^abc]</code></td>
87        <td>Any single character except: a, b, or c</td>
88      </tr>
89      <tr>
90        <td><code>[a-z]</code></td>
91        <td>Any single character in the range a-z</td>
92      </tr>
93      <tr>
94        <td><code>[a-zA-Z]</code></td>
95        <td>Any single character in the range a-z or A-Z</td>
96      </tr>
97      <tr>
98        <td><code>^</code></td>
99        <td>Start of line</td>
100      </tr>
101      <tr>
102        <td><code>$</code></td>
103        <td>End of line</td>
104      </tr>
105      <tr>
106        <td><code>\A</code></td>
107        <td>Start of string</td>
108      </tr>
109      <tr>
110        <td><code>\z</code></td>
111        <td>End of string</td>
112      </tr>
113    </table>
114  </div>
115
116  <div style="float:left">
117    <table>
118      <tr>
119        <td><code>.</code></td>
120        <td>Any single character</td>
121      </tr>
122    <tr>
123      <td><code>\s</code></td>
124      <td>Any whitespace character</td>
125    </tr>
126    <tr>
127      <td><code>\S</code></td>
128      <td>Any non-whitespace character</td>
129    </tr>
130    <tr>
131      <td><code>\d</code></td>
132      <td>Any digit</td>
133    </tr>
134    <tr>
135      <td><code>\D</code></td>
136      <td>Any non-digit</td>
137    </tr>
138    <tr>
139      <td><code>\w</code></td>
140      <td>Any word character (letter, number, underscore)</td>
141    </tr>
142    <tr>
143      <td><code>\W</code></td>
144      <td>Any non-word character</td>
145    </tr>
146    <tr>
147      <td><code>\b</code></td>
148      <td>Any word boundary</td>
149    </tr>
150  </table>
151</div>
152
153<table>
154  <tr>
155    <td><code>(...)</code></td>
156    <td>Capture everything enclosed</td>
157  </tr>
158  <tr>
159    <td><code>(a|b)</code></td>
160    <td>a or b</td>
161  </tr>
162  <tr>
163    <td><code>a?</code></td>
164    <td>Zero or one of a</td>
165  </tr>
166  <tr>
167    <td><code>a*</code></td>
168    <td>Zero or more of a</td>
169  </tr>
170  <tr>
171    <td><code>a+</code></td>
172    <td>One or more of a</td>
173  </tr>
174  <tr>
175    <td><code>a{3}</code></td>
176    <td>Exactly 3 of a</td>
177  </tr>
178  <tr>
179    <td><code>a{3,}</code></td>
180    <td>3 or more of a</td>
181  </tr>
182  <tr>
183    <td><code>a{3,6}</code></td>
184    <td>Between 3 and 6 of a</td>
185  </tr>
186</table>
187
188<div id="regex_options">
189	<p>
190		options:
191		<span class="regex_option"><code>i</code> case insensitive</span>
192		<span class="regex_option"><code>m</code> make dot match newlines</span>
193		<span class="regex_option"><code>x</code> ignore whitespace in regex</span>
194		<span class="regex_option"><code>o</code> perform #{...} substitutions only once</span>
195	</p>
196</div>
197
198</div>
199      <div id="birdseed" class="birdseed">
200
201	<p>Rubular uses Ruby 2.5.9. Share questions/comments/issues  <a href="https://twitter.com/rubular">@rubular</a>. Made by <a href="https://lovitt.net">Michael Lovitt</a> <a href="https://twitter.com/lovitt">@lovitt</a>.</p>
202
203</div>
204
205    </div>
206
207    
207<script src="/assets/application-0ea1ad0961b9d166106fd39dabac34810e59572b61d5c7fddab75597635b09f4.js"></script>
207
208    
208<script type="text/javascript">
209
210  var _gaq = _gaq || [];
211  _gaq.push(['_setAccount', 'UA-2302692-1']);
212  _gaq.push(['_trackPageview']);
213
214  (function() {
215    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
216    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
217    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
218  })();
219
220</script>
220
221    
221<script type="text/javascript" src="//m.servedby-buysellads.com/monetization.js"></script>
221
222<div id="native-fixed-js"></div>
223<script>
224(function() {
225  if (typeof _bsa !== 'undefined' && _bsa) {
226    _bsa.init('custom', 'CE7DEK37', 'placement:rubularcom', {
227      target: '#native-fixed-js',
228      template: `
229<div style="background-color: ##backgroundColor##" class="native-fixed">
230  <a style="color: ##textColor##" class="native-link" href="##link##">
231    <div class="native-sponsor" style="background-color: ##textColor##; color: ##backgroundColor##">Sponsor</div>
232    <div class="native-text">##company## — ##description##</div>
233  </a>
234</div>
235    `
236    });
237  }
238})();
239</script>
239
240
241
242
243  
243<script type="module" src="https://static.cloudflareinsights.com/beacon.min.js/v31edd6df95cf4e85bb4c19e7a9bdbcba1788362987495" integrity="sha512-iIg7k2xntmwu6/uSb5tpc/hySgZc4eoL31yB29W6tJFo2akwjPWcEqnCEdJvGexCL0KEQwVYv5BlowfhVz26hg==" data-cf-beacon='{"version":"2024.11.0","token":"5efdf8b80c534aeeb89f3bfd23bca9c3","r":1,"spa":2}' crossorigin="anonymous"></script>
243
244</body>
245</html>

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.