|
1 | | -<!doctype html> |
| 1 | +<!DOCTYPE html> |
2 | 2 | <html lang="en"> |
3 | | - |
4 | | -<head> |
5 | | - <meta charset="utf-8"> |
6 | | - <meta http-equiv="x-ua-compatible" content="ie=edge"> |
7 | | - <title>Regular Expression Pattern Creator</title> |
8 | | - <meta name="description" content="A tool to generate a concise Regular Expression matching given words/phrases."> |
9 | | - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
10 | | - |
11 | | - <!-- Google Tag Manager --> |
12 | | - <script> |
13 | | - (function (w, d, s, l, i) { |
14 | | - w[l] = w[l] || []; w[l].push({ |
15 | | - 'gtm.start': |
16 | | - new Date().getTime(), event: 'gtm.js' |
17 | | - }); var f = d.getElementsByTagName(s)[0], |
18 | | - j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = |
19 | | - 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); |
20 | | - })(window, document, 'script', 'dataLayer', 'GTM-W4BK9P'); |
21 | | - </script> |
22 | | - <!-- End Google Tag Manager --> |
23 | | - |
24 | | - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.1.3/flatly/bootstrap.min.css" |
25 | | - integrity="sha256-O7FfDCaEf9kSRN9b9kmWu8C3rhL1hxEpPHp+CTZ4pMk=" crossorigin="anonymous" /> |
26 | | - <link rel="stylesheet" href="styles.css" /> |
27 | | - |
28 | | - <script src="https://cdn.polyfill.io/v2/polyfill.js?features=Array.from,Map,Set&flags=gated"></script> |
29 | | -</head> |
30 | | - |
31 | | -<body> |
32 | | - <!-- Google Tag Manager (noscript) --> |
33 | | - <noscript> |
34 | | - <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W4BK9P" height="0" width="0" style="display:none;visibility:hidden"> |
35 | | - </iframe> |
36 | | - </noscript> |
37 | | - <!-- End Google Tag Manager (noscript) --> |
38 | | - |
39 | | - <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> |
40 | | - <div class="container"> |
41 | | - <a class="navbar-brand" href="javascript:void(0)">RegEx Pattern Creator</a> |
42 | | - </div> |
43 | | - </nav> |
44 | | - |
45 | | - <div class="jumbotron"> |
46 | | - <form class="container js-form"> |
47 | | - <p class="lead">Generate a concise Regular Expression.</p> |
48 | | - |
49 | | - <div class="form-group"> |
50 | | - <label for="words"> |
51 | | - Words or phrases the Regular Expression should match: |
52 | | - </label> |
53 | | - <textarea required id="words" class="form-control js-words"></textarea> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <meta http-equiv="x-ua-compatible" content="ie=edge" /> |
| 6 | + <title> |
| 7 | + Strings to RegEx - Generate a concise Regular Expression matching given |
| 8 | + words/phrases |
| 9 | + </title> |
| 10 | + <meta |
| 11 | + name="description" |
| 12 | + content="A tool to generate a concise Regular Expression matching given words/phrases." |
| 13 | + /> |
| 14 | + <meta |
| 15 | + name="viewport" |
| 16 | + content="width=device-width, initial-scale=1, shrink-to-fit=no" |
| 17 | + /> |
| 18 | + |
| 19 | + <!-- Google Tag Manager --> |
| 20 | + <script> |
| 21 | + (function(w, d, s, l, i) { |
| 22 | + w[l] = w[l] || []; |
| 23 | + w[l].push({ |
| 24 | + 'gtm.start': new Date().getTime(), |
| 25 | + event: 'gtm.js', |
| 26 | + }); |
| 27 | + var f = d.getElementsByTagName(s)[0], |
| 28 | + j = d.createElement(s), |
| 29 | + dl = l != 'dataLayer' ? '&l=' + l : ''; |
| 30 | + j.async = true; |
| 31 | + j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; |
| 32 | + f.parentNode.insertBefore(j, f); |
| 33 | + })(window, document, 'script', 'dataLayer', 'GTM-W4BK9P'); |
| 34 | + </script> |
| 35 | + <!-- End Google Tag Manager --> |
| 36 | + |
| 37 | + <link |
| 38 | + rel="stylesheet" |
| 39 | + href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.1.3/flatly/bootstrap.min.css" |
| 40 | + integrity="sha256-O7FfDCaEf9kSRN9b9kmWu8C3rhL1hxEpPHp+CTZ4pMk=" |
| 41 | + crossorigin="anonymous" |
| 42 | + /> |
| 43 | + <link rel="stylesheet" href="styles.css" /> |
| 44 | + |
| 45 | + <script src="https://cdn.polyfill.io/v2/polyfill.js?features=Array.from,Map,Set&flags=gated"></script> |
| 46 | + </head> |
| 47 | + |
| 48 | + <body> |
| 49 | + <!-- Google Tag Manager (noscript) --> |
| 50 | + <noscript> |
| 51 | + <iframe |
| 52 | + src="https://www.googletagmanager.com/ns.html?id=GTM-W4BK9P" |
| 53 | + height="0" |
| 54 | + width="0" |
| 55 | + style="display:none;visibility:hidden" |
| 56 | + > |
| 57 | + </iframe> |
| 58 | + </noscript> |
| 59 | + <!-- End Google Tag Manager (noscript) --> |
| 60 | + |
| 61 | + <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> |
| 62 | + <div class="container"> |
| 63 | + <a class="navbar-brand" href="javascript:void(0)">Strings to RegEx</a> |
| 64 | + <a |
| 65 | + href="https://github.com/wimpyprogrammer/strings-to-regex" |
| 66 | + title="See strings-to-regex on GitHub" |
| 67 | + > |
| 68 | + <svg aria-hidden="true" height="32" viewBox="0 0 16 16" width="32"> |
| 69 | + <path |
| 70 | + fill-rule="evenodd" |
| 71 | + d="M8 0a8 8 0 0 0-2.5 15.6c.4 0 .5-.2.5-.4v-1.5c-2 .4-2.5-.5-2.7-1 0-.1-.5-.9-.8-1-.3-.2-.7-.6 0-.6.6 0 1 .6 1.2.8.7 1.2 1.9 1 2.4.7 0-.5.2-.9.5-1-1.8-.3-3.7-1-3.7-4 0-.9.3-1.6.8-2.2 0-.2-.3-1 .1-2 0 0 .7-.3 2.2.7a7.4 7.4 0 0 1 4 0c1.5-1 2.2-.8 2.2-.8.5 1.1.2 2 .1 2.1.5.6.8 1.3.8 2.2 0 3-1.9 3.7-3.6 4 .3.2.5.7.5 1.4v2.2c0 .2.1.5.5.4A8 8 0 0 0 16 8a8 8 0 0 0-8-8z" |
| 72 | + /> |
| 73 | + </svg> |
| 74 | + </a> |
54 | 75 | </div> |
| 76 | + </nav> |
| 77 | + |
| 78 | + <div class="jumbotron"> |
| 79 | + <form class="container js-form"> |
| 80 | + <p class="lead">Generate a concise Regular Expression.</p> |
55 | 81 |
|
56 | | - <div class="form-inline"> |
57 | 82 | <div class="form-group"> |
58 | | - <label for="delimiter"> |
59 | | - Words/phrases are separated by: |
| 83 | + <label for="words"> |
| 84 | + Words or phrases the Regular Expression should match: |
60 | 85 | </label> |
61 | | - <select id="delimiter" class="form-control js-delimiter track-field"> |
62 | | - <option value="," selected>Comma</option> |
63 | | - <option value=" ">Space</option> |
64 | | - <option value=" ">Newline</option> |
65 | | - </select> |
| 86 | + <textarea class="form-control js-words" required rows="1"></textarea> |
66 | 87 | </div> |
67 | 88 |
|
68 | | - <div class="form-group form-check"> |
69 | | - <input type="checkbox" checked id="case" class="form-check-input js-case track-field"> |
70 | | - <label class="form-check-label" for="case"> |
71 | | - Case-sensitive |
72 | | - </label> |
| 89 | + <div class="form-inline"> |
| 90 | + <div class="form-group"> |
| 91 | + <label for="delimiter"> |
| 92 | + Words/phrases are separated by: |
| 93 | + </label> |
| 94 | + <select |
| 95 | + id="delimiter" |
| 96 | + class="form-control js-delimiter track-field" |
| 97 | + > |
| 98 | + <option value="," selected>Comma</option> |
| 99 | + <option value=" ">Space</option> |
| 100 | + <option value=" ">Newline</option> |
| 101 | + </select> |
| 102 | + </div> |
| 103 | + |
| 104 | + <div class="form-group form-check"> |
| 105 | + <input |
| 106 | + type="checkbox" |
| 107 | + checked |
| 108 | + id="case" |
| 109 | + class="form-check-input js-case track-field" |
| 110 | + /> |
| 111 | + <label class="form-check-label" for="case"> |
| 112 | + Case-sensitive |
| 113 | + </label> |
| 114 | + </div> |
| 115 | + |
| 116 | + <div class="form-group form-check"> |
| 117 | + <input |
| 118 | + type="checkbox" |
| 119 | + checked |
| 120 | + id="trim" |
| 121 | + class="form-check-input js-trim track-field" |
| 122 | + /> |
| 123 | + <label class="form-check-label" for="trim"> |
| 124 | + Trim whitespace surrounding each word/phrase |
| 125 | + </label> |
| 126 | + </div> |
73 | 127 | </div> |
74 | 128 |
|
75 | | - <div class="form-group form-check"> |
76 | | - <input type="checkbox" checked id="trim" class="form-check-input js-trim track-field"> |
77 | | - <label class="form-check-label" for="trim"> |
78 | | - Trim whitespace surrounding each word/phrase |
79 | | - </label> |
| 129 | + <div class="form-group submit-form-group"> |
| 130 | + <button |
| 131 | + type="button" |
| 132 | + class="btn btn-lg btn-primary js-generate track-generate" |
| 133 | + > |
| 134 | + Generate Regular Expression |
| 135 | + </button> |
80 | 136 | </div> |
81 | | - </div> |
82 | | - |
83 | | - <div class="form-group submit-form-group"> |
84 | | - <button type="button" class="btn btn-lg btn-primary js-generate track-generate"> |
85 | | - Generate Regular Expression |
86 | | - </button> |
87 | | - </div> |
88 | | - </form> |
89 | | - </div> |
90 | | - |
91 | | - <div class="container"> |
92 | | - <section class="output"> |
93 | | - <div class="form-group"> |
94 | | - <label for="output"> |
95 | | - Matching Regular Expression: |
96 | | - </label> |
97 | | - <textarea readonly="readonly" id="output" class="form-control js-output"></textarea> |
98 | | - </div> |
99 | | - </section> |
100 | | - |
101 | | - <hr> |
102 | | - |
103 | | - <footer> |
104 | | - <p class="float-left"> |
105 | | - © <a href="http://www.wimpyprogrammer.com/">WimpyProgrammer.com</a> 2018 |
106 | | - </p> |
107 | | - <p class="float-right"> |
108 | | - <a href="https://github.com/wimpyprogrammer/strings-to-regex">Fork me on GitHub</a> |
109 | | - or <a href="https://github.com/wimpyprogrammer/strings-to-regex/issues">report an issue</a> |
110 | | - </p> |
111 | | - </footer> |
112 | | - </div> |
| 137 | + </form> |
| 138 | + </div> |
113 | 139 |
|
114 | | - <script type="text/javascript" src="demo.js"></script> |
115 | | -</body> |
| 140 | + <div class="container"> |
| 141 | + <section class="output"> |
| 142 | + <div class="form-group"> |
| 143 | + <label for="output"> |
| 144 | + Matching Regular Expression: |
| 145 | + </label> |
| 146 | + <textarea |
| 147 | + readonly="readonly" |
| 148 | + id="output" |
| 149 | + class="form-control js-output" |
| 150 | + rows="1" |
| 151 | + ></textarea> |
| 152 | + <a class="form-text js-link-expand" href="javascript:void(0)"> |
| 153 | + Expand expression with <code>regex-to-strings</code> |
| 154 | + </a> |
| 155 | + </div> |
| 156 | + </section> |
| 157 | + |
| 158 | + <hr /> |
| 159 | + |
| 160 | + <footer> |
| 161 | + <p class="float-left"> |
| 162 | + © |
| 163 | + <a href="http://www.wimpyprogrammer.com/">WimpyProgrammer.com</a> 2018 |
| 164 | + </p> |
| 165 | + <p class="float-right"> |
| 166 | + <a href="https://github.com/wimpyprogrammer/strings-to-regex" |
| 167 | + >Fork me on GitHub</a |
| 168 | + > |
| 169 | + or |
| 170 | + <a href="https://github.com/wimpyprogrammer/strings-to-regex/issues" |
| 171 | + >report an issue</a |
| 172 | + > |
| 173 | + </p> |
| 174 | + </footer> |
| 175 | + </div> |
116 | 176 |
|
| 177 | + <script type="text/javascript" src="lib/demo.js"></script> |
| 178 | + </body> |
117 | 179 | </html> |
0 commit comments