简体   繁体   English

关于 asp.net 正则表达式

[英]regarding asp.net regular expression

i have a textbox and i am using a regular expression in asp.net and i want my user to enter in this format cat10 as cat followed by numbers so what should be my regular expression我有一个文本框,我在 asp.net 中使用正则表达式,我希望我的用户以这种格式输入 cat10 作为 cat 后跟数字,所以我的正则表达式应该是什么

You can use the following:您可以使用以下内容:

cat\d+

Where the literal cat is followed by one or more numerals.文字cat后跟一个或多个数字。

A good resource for regular expressions is http://regular-expressions.info正则表达式的一个很好的资源是http://regular-expressions.info

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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