简体   繁体   中英

asp.net validation. What is the RegularExpression for this?

I want to allow only 9 numbers without any letters and the letter 'V' at the last. Altogether 10 digits.

Eg - 123456789V, 675645238V

not allowed letters other than 'V' or 'v' at the end.

What is the Expression should I use?

The regex will be (exactly 9 digits and V or v in the end):

^[0-9]{9}[Vv]$

If in the beginning or end can be some other symbols (to much something like this - aaa123456789Vbbbb ):

[0-9]{9}[Vv]

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