![]() |
|
|
#100 | |
|
Dec 2012
2·139 Posts |
Thank you very much Xyzzy! I do appreciate it. I had in mind something similar to a1call's suggestion, but if this is all that you can reasonably do with the forum software, I am grateful.
Quote:
I would also hope that (were this ever to be implemented) this could be disabled or enabled in a post, just as smilies and parsing of links can be enabled or disabled under Miscellaneous Options. I would even encourage this to be turned off by default. |
|
|
|
|
|
|
#101 | |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
40078 Posts |
Quote:
Wikipedia article on Regular-Expressions: https://en.wikipedia.org/wiki/Regular_expression |
|
|
|
|
|
|
#102 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
205510 Posts |
Copy the code:
Code:
<!DOCTYPE html>
<html>
<body>
<p>Replace "microsoft" with "W3Schools" in the paragraph below:</p>
<button onclick="myFunction()">Try it</button>
<p id="demo">exponent Bad Good Unk Sus Solo Mis worktodo
50248349 1 0 1 0 1 0 DoubleCheck=50248349,73,1
50956921 0 0 4 0 4 0 DoubleCheck=50956921,73,1
52479409 0 0 3 0 3 0 DoubleCheck=52479409,73,1
53167397 0 0 4 0 4 0 DoubleCheck=53167397,73,1
53312419 0 0 4 0 4 0 DoubleCheck=53312419,73,1
53576399 0 0 3 0 3 0 DoubleCheck=53576399,73,1
53902309 0 0 2 0 2 0 DoubleCheck=53902309,73,1</p>
<script>
function myFunction() {
var str = document.getElementById("demo").innerHTML;
var txt = str.replace(/(DoubleCheck=)([0-9]{3,})(,)/g,"$1<a href=https://www.mersenne.org/report_exponent/?exp_lo=+$2"+"&full=1>$2</a>$3");
document.getElementById("demo").innerHTML = txt;
}
</script>
</body>
</html>
Paste and replace the left frame here: https://www.w3schools.com/js/tryit.a...replace_regexp Then click "Run" Then click "Try it" |
|
|
|
|
|
#103 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
3·5·137 Posts |
Now that I think about it, you could run a primality test on the matched exponent and only insert the link if true.
|
|
|
|
|
|
#104 |
|
Dec 2012
2×139 Posts |
Right, it would take next to no time. But an upper bound would need to be fixed, the obvious answer being the current PrimeNet limit of 999,999,999.
Last fiddled with by Jayder on 2017-04-02 at 21:14 |
|
|
|
|
|
#105 |
|
"Rashid Naimi"
Oct 2015
Remote to Here/There
3·5·137 Posts |
Yes, the previous prime is 999,999,9673 and can be instantly checked at:
https://www.mathsisfun.com/prime_numbers.html |
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Collaboration Requests | robert44444uk | Prime Gap Searches | 2 | 2017-01-17 07:57 |
| Requests for change... | WraithX | FactorDB | 32 | 2014-12-18 03:40 |
| Manual Requests | tului | GPU Computing | 15 | 2014-06-24 06:22 |
| a few simple requests for v5 | ixfd64 | PrimeNet | 44 | 2010-01-11 20:21 |
| New Year requests | masser | Sierpinski/Riesel Base 5 | 22 | 2007-09-24 21:05 |