Staff I am in need of assistance related to regex

Asked

Viewed 55 times

0

I have a string in the following format.
EX: 5 4 3 2.

I set up a regex to take each position of this string and make a range of values (min and max), my doubt is how I can pass in my regex to this string accept the character "*" also.
My regex: \b(0?[0-9]|1[0-9]|2[0-3])\b \b(0?[1-9]|1[0-9]|2[0-3]|3[0-1])\b \b(0?[0-9]|1[0-1])\b \b(0?[0-6])\b.

Thanks in advance

  • 2

    Just put \* in the place where you want to have the asterisk.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.