Regular Expression

  • Thread starter Thread starter Richard Wilde
  • Start date Start date
R

Richard Wilde

How do i match and return true for this string as a regular expression?

Gdd_dd

Where dd is a single digit

Can anyone help me?

Thanks
Rippo
 
Richard Wilde said:
How do i match and return true for this string as a regular expression?

Gdd_dd

Where dd is a single digit

\\\
Const Expression As String = "G\d\d_\d\d"
MsgBox(Regex.IsMatch("GAA_12", Expression)) ' 'False'.
MsgBox(Regex.IsMatch("G19_12", Expression)) ' 'True'.
MsgBox(Regex.IsMatch("G1_1", Expression)) ' 'False'.
///
 
Herfried,

You really have no exam this week it seems.
An answer on a regular expression from you.

:-)

Cor
 
Cor,

Cor Ligthert said:
You really have no exam this week it seems.
An answer on a regular expression from you.

Holidays have started this week, so I have more time to experiment and look
into the documentation.

:-)
 

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

Back
Top