In Typescript, how to validate string pattern? example const str = "ABC1-AB9"
^[A-z0-9]{4}-[A-z0-9]{3} [0-9]{1}
This could be the regex you are looking for. You can test the same by going to https://regexr.com/ website and making your own custom regex.
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.