|
追问 测试了下 "0-"无法通过。正则表达式好像不对。。。
追答
你要的是啥?
追问 我的要求是 string中只包含数字和-符号,欧博且至少包含一个数字和-字符。
追答
String regex="(\\d+[-]+)|([-]+\\d+)";
追问 对了。谢谢。不过我有个疑问。我加了/^(\\d+[-]+)|([-]+\\d+)$/和不加有区别吗? 本回答被提问者采纳
|
|
追问 测试了下 "0-"无法通过。正则表达式好像不对。。。
追答
你要的是啥?
追问 我的要求是 string中只包含数字和-符号,欧博且至少包含一个数字和-字符。
追答
String regex="(\\d+[-]+)|([-]+\\d+)";
追问 对了。谢谢。不过我有个疑问。我加了/^(\\d+[-]+)|([-]+\\d+)$/和不加有区别吗? 本回答被提问者采纳
|
Société Industrielle De Chauffage Entreprises - IC Entreprises (Rungis, 94150) :...
免费一次性临时邮箱,保护您的个人电子邮件地址免受垃圾邮件、机器人、网络钓鱼和其他在线滥用的侵害,以获得真正私密的在线体验...
Yellowstone National Park IUCN Category II (National Park) ...
This page provides details on SEPHORA, located at 2929 Barnet Hwy #2730, Coquitl...
It’s telling that a film about aliens judging the rottenness of our species come...
Irritable bowel syndrome (IBS) is a common gastrointestinal disorder affecting u...
Download VLC Media Player for Windows for free. A powerful media player and stre...
https://www.cidrap.umn.edu/all-news US COVID declining after reaching peak Ne...
Are you looking for a gas station nearby in New York City? Check out the map to ...
*herbivore* Animal that feeds solely on plants. The term is most often applied t...