Link to home
Start Free TrialLog in
Avatar of NevSoFly
NevSoFly

asked on

Need expression to find mixed number in string.

I am looking for a regular expression pattern that will find mixed numbers as in below:

1 1/2
12 2/3
2 11/13

There is a white space between the whole number and fraction. This is to be used with VB.net code.
Avatar of Mazdajai
Mazdajai
Flag of United States of America image

Try

(^\d{1,2}\s\d{1,2}\/\d{1,2}$)

Open in new window

Avatar of NevSoFly
NevSoFly

ASKER

Thanks for your help.  Unfortunately I for got to add that I was attempting to replace the white space in the string between the whole number and fraction with ":".

My apologies for such poor communication.
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial