
Thank Conrad... but I think the engine is the one that's wrong, coz what would then be the difference between ^\d{10} and ^\d{10,} ? On 4 March 2010 00:27, Rad! <conradakunga@gmail.com> wrote:
The regex you have is right. But it is also wrong
\d{10} means a number with 10 digits. A number with eleven digits also has ten digits.
If you mean that you want a string with exactly ten digits the regex you want is this one
^\d{10}$
On Wed, Mar 3, 2010 at 3:08 PM, Ndungi Kyalo <ndungi@gmail.com> wrote:
Thats a handfull. Perl Regex (which I believe .NET implements) would be
/[0-9]{10}/ ... And to be absolutely sure : /[0-9]{10,10}/
Its also possible that the slight differences between these regex engines is the reason our good friend was pulling at his hairs.
-- Ndungi Kyalo biblia.kenya.or.ke
On Wed, Mar 3, 2010 at 11:44 AM, <ashok+skunkworks@parliaments.info<ashok%2Bskunkworks@parliaments.info>
wrote:
On Wed, Mar 3, 2010 at 2:23 PM, Simon Mbuthia <simon.mbuthia@gmail.com> wrote:
Never mind, I used if (!match.Success || txtAccountNum.Text.Length != 10) throw Exception else Endelea()
the posix regex for 10 digits looks like this : [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] _______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Server donations spreadsheet
http://spreadsheets.google.com/ccc?key=0AopdHkqSqKL-dHlQVTMxU1VBdU1BSWJxdy1f... ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke Other lists ------------- Announce: http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks-announce Science: http://lists.my.co.ke/cgi-bin/mailman/listinfo/science kazi: http://lists.my.co.ke/cgi-bin/mailman/admin/kazi/general
-- Everyone's days are numbered. It's called a calendar