Regular Expression

E

Etu

Hellow all,

Could someone please help? I need a regular expression for evoluating
if a string contains at least three letters (a-z or A-Z)or more in
sequence, that is, I need a true result for these strings:

8329abc48*(39jk0
^^^ <-three letters
@()jfsd483%@
^^^^ <-four letters
fjakdsl849302jfalkd
^^^^^^^ ^^^^^^ <-many letters

and a false result for these strings:
4839&*#gb08
^^ <-two letters

Thanks a lot,

Etu
 
D

Dmitriy Lapshin [C# / .NET MVP]

Hi,

Should be something like

string re = @"[a-zA-Z]{3}"; // Consult MSDN for the exact syntax of the
quantifier - not sure how to specify a single value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Regular expression 4
Regular Expression Help 2
Regular Expression help 2
regular expressions 5
Regular Expression Help 2
Regular Expression Help 1
regex problem 6
Problem with regular expression 3

Top