Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
224 lines (213 sloc) 7.54 KB
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<title>Scriptular - Javascript Regular Expression Editor</title>
<link href="application.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Reenie+Beanie&text=Scriptular" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="spine.js"></script>
<script src="application.js"></script>
<script>
$(function() {
new App();
});
</script>
<link rel="apple-touch-icon" sizes="57x57" href="icons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="icons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="icons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="icons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="icons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="icons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="icons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="icons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="icons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="icons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
<link rel="manifest" href="/icons/manifest.json">
</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" rel="noopener">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" rel="noopener">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 hexadecimal number dd</td>
</tr>
<tr>
<td class="regex">\uxxxx</td>
<td>Match a Unicode character specified by hexadecimal 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" rel="noopener">Hoyt</a> and maintained by <a href="https://github.com/jonmagic/scriptular#contributors" rel="noopener">many</a>. To contribute or report an issue visit <a href="https://github.com/jonmagic/scriptular" rel="noopener">the project on GitHub</a>.</p>
</div>
</div>
<script>
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '4f542216cb25bc2358000006');
t.src = 'https://secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
</body>
</html>