Regular expression question

  • Thread starter Thread starter Mic
  • Start date Start date
M

Mic

Hi,

What would be the regex pattern for an alphanumeric string of exactly
12 characters with spaces allowed anywhere ?

Like:

" ab cd " is ok
"abc d" is ok

etc...


Thanks
 
Hi,

What would be the regex pattern for an alphanumeric string of exactly
12 characters with spaces allowed anywhere ?

Like:

" ab cd " is ok
"abc d" is ok


Try:

[0-9\s]{12}

0 - 9 and spaces, 12 characters long
 
Mic said:
Hi,

What would be the regex pattern for an alphanumeric string of exactly
12 characters with spaces allowed anywhere ?

Like:

" ab cd " is ok
"abc d" is ok

etc...


Thanks

I am not near my PC where I could answer this , but look for an app called
Expresso. Its free and written in Dot.Net. It has a great interface to
create and test regex.

Hope this helps
LS
 
Back
Top