Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: gh-pages
Fetching contributors…

Cannot retrieve contributors at this time

209 lines (199 sloc) 6.617 kb
<html>
<head>
<title>Scriptular - Javascript Regular Expression Editor</title>
<link rel="stylesheet" type="text/css" href="application.css">
<link href='http://fonts.googleapis.com/css?family=Reenie+Beanie' rel='stylesheet' type='text/css'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="spine.js" type="text/javascript"></script>
<script src="application.js" type="text/javascript"></script>
<script>
$(function() {
new App();
});
</script>
</head>
<body>
<div id="container">
<div id="header">
<h1><a href="/">Scriptular</a></h1>
<h2>A javascript regular expression editor</h2>
</div>
<div id="main">
<div id="expression">
<h2>Regular Expression:</h2>
/<input name="expression" />/<input name="option" />
</div>
<div id="test_strings">
<h2>Test Strings:</h2>
<textarea name="test_strings"></textarea>
</div>
<div id="intro">
<p>Scriptular is a javascript regular expression editor. Inspired by <a href="http://rubular.com" target="_blank">Rubular</a> it gives you a simple way to test javascript regular expressions as you write them.</p>
<p>Start by entering a regular expression and then a test string. Or give this <a href="#" id="example">example a try</a>.</p>
<p><a href="https://developer.mozilla.org/en/JavaScript/Guide/Regular_Expressions" target="_blank">Learn more</a> about regular expressions in javascript.</p>
</div>
<div id="error">
<p>No Matches</p>
</div>
<div id="output">
<h2>Match Results:</h2>
<ul id="results"></ul>
<h2>Match Groups:</h2>
<ul id="groups"></ul>
<h2>Share Link:</h2>
<ul id="shares">
<li><a id="share_link" href="">Share this regular expression</a></li>
</ul>
</div>
</div>
<div id="quick_reference">
<div class="scrollable">
<h2>Modifiers:</h2>
<table>
<tr>
<td class="regex">i</td>
<td>Perform case-insensitive matching</td>
</tr>
<tr>
<td class="regex">g</td>
<td>Perform a global match</td>
</tr>
</table>
<h2>Brackets:</h2>
<table>
<tr>
<td class="regex">[abc]</td>
<td>Match a single character a, b, or c</td>
</tr>
<tr>
<td class="regex">[^abc]</td>
<td>Match any character except a, b, or c</td>
</tr>
<tr>
<td class="regex">[A-z]</td>
<td>Match any character from uppercase A to lowercase z</td>
</tr>
<tr>
<td class="regex">(ab|cd|ef)</td>
<td>Match either ab, cd, or ef</td>
</tr>
<tr>
<td class="regex">(...)</td>
<td>Capture anything enclosed</td>
</tr>
</table>
<h2>Metacharacters</h2>
<table>
<tr>
<td class="regex">^</td>
<td>Start of line</td>
</tr>
<tr>
<td class="regex">$</td>
<td>End of line</td>
</tr>
<tr>
<td class="regex">.</td>
<td>Match any character</td>
</tr>
<tr>
<td class="regex">\w</td>
<td>Match a word chracter</td>
</tr>
<tr>
<td class="regex">\W</td>
<td>Match a non-word character</td>
</tr>
<tr>
<td class="regex">\d</td>
<td>Match a digit</td>
</tr>
<tr>
<td class="regex">\D</td>
<td>Match any non-digit character</td>
</tr>
<tr>
<td class="regex">\s</td>
<td>Match a whitespace character</td>
</tr>
<tr>
<td class="regex">\S</td>
<td>Match a non-whitespace character</td>
</tr>
<tr>
<td class="regex">\b</td>
<td>Match character at the beginning or end of a word</td>
</tr>
<tr>
<td class="regex">\B</td>
<td>Match a character not at beginning or end of a word</td>
</tr>
<tr>
<td class="regex">\0</td>
<td>Match a NUL character</td>
</tr>
<tr>
<td class="regex">\t</td>
<td>Match a tab character</td>
</tr>
<tr>
<td class="regex">\xxx</td>
<td>Match a character specified by octal number xxx</td>
</tr>
<tr>
<td class="regex">\xdd</td>
<td>Match a character specified by hexidecimal number dd</td>
</tr>
<tr>
<td class="regex">\uxxxx</td>
<td>Match a Unicode character specified by hexidecimal number xxxx</td>
</tr>
</table>
<h2>Quantifiers</h2>
<table>
<tr>
<td class="regex">n+</td>
<td>Match at least one n</td>
</tr>
<tr>
<td class="regex">n*</td>
<td>Match zero or more n's</td>
</tr>
<tr>
<td class="regex">n?</td>
<td>Match zero or one n</td>
</tr>
<tr>
<td class="regex">n{X}</td>
<td>Match sequence of X n's</td>
</tr>
<tr>
<td class="regex">n{X,Y}</td>
<td>Match sequence of X to Y n's</td>
</tr>
<tr>
<td class="regex">n{X,}</td>
<td>Match sequence of X or more n's</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>Created by <a href="http://theprogrammingbutler.com">Hoyt</a> and maintained by <a href="https://github.com/jonmagic/scriptular#contributors">many</a>. To contribute or report an issue visit <a href="https://github.com/jonmagic/scriptular">the project on GitHub</a>.</p>
</div>
</div>
<script type="text/javascript">
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '4f542216cb25bc2358000006');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.