Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: counting digits in a string
In article jth_at_chronicle.concentric.net, "Mark Foley" <meftech_at_concentric.net> writes:
>I have a requirement that a user supplied password string contain at least
>two digits. So far I have not been able to come up with a good way to count
>the number of digits in a string. I would think some combination of
>TRANSLATE
>and something else could accomodate this. This would be a stored procedure
>being called from an ASP page.
>
>Any suggestions greatly appreciated.
You could match against a regular expression: /\D*\d\D*\d/
This will match zero or more non-digits followed by a digit followed by zero or more non-digits and another digit.
Good luck, /Yogi
---
John (Yogi) Allen ETL XL/XM SEPG (APStools Support)
Email: etljhan_at_etl.ericsson.se Memo: ETL.ETLJHAN Burgess Hill, W.Sussex, UK 832 4812 01444 234812"I think, therefore I can" - Thomas the Tank Engine Received on Sun Nov 22 1998 - 02:08:42 CST
![]() |
![]() |