RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Prime Numbers < 1000
Expression
^([2357]|1[1379]|2[39]|[58][39]|4[137]|[36][17]|7[139]|97|[134]49|1([09][1379]|13|27|3[179]|5[17]|6[37]|7[39]|81)|2(11|2[379]|[36][39]|41|[57][17]|8[13]|93)|3(07|1[137]|3[17]|47|[578][39]|67|97)|4([013479]9|[02369]1|[346]3|[568]7)|5([0269]3|[247]1|[069]9|[4578]7)|6([03469]1|[14578]3|[0147]7|[15]9)|7([056]1|[347]3|[0136]9|[2589]7)|8([128]1|[2568]3|[2578]7|[0235]9)|9([1479]1|[58]3|[034679]7|[12]9))$
Description
Not fully tested but this behemoth of an expression should do Prime Numbers below 1000
Matches
1 | 3 | 971
Non-Matches
2 | 54 | 998
Author Rating: The rating for this expression. PJWhitfield
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials