|
@@ -6,6 +6,7 @@
|
|
|
<title>Regex Tester</title>
|
|
|
|
|
|
<script>
|
|
|
+
|
|
|
function substitute() {
|
|
|
pattern = document.getElementById('pattern').value;
|
|
|
text = document.getElementById('text').value;
|
|
@@ -18,6 +19,12 @@ function substitute() {
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+function copy() {
|
|
|
+ document.getElementById('result').select();
|
|
|
+ document.execCommand('copy');
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<form onsubmit="return substitute()">
|
|
@@ -29,6 +36,10 @@ function substitute() {
|
|
|
<p><input type="submit" value="substitute"></p>
|
|
|
</form>
|
|
|
|
|
|
-<textarea id='result'></textarea>
|
|
|
+<p>
|
|
|
+ <textarea id="result"></textarea>
|
|
|
+ <br>
|
|
|
+ <input type="button" onclick="copy()" value="copy">
|
|
|
+</p>
|
|
|
|
|
|
</html>
|