简体   繁体   中英

Need Regex match pattern

I have a string which i need to parse using Regex class of System.Text.RegularExpressions . I need to find if the first 2 characters of the string are either "00" or "07" or "16" or "23". Please let me know as what the pattern would be to match the above.

You could do:

^(00|07|16|23).*

As seen on rubular

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM