Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可以控制字符串 Number 是否有 9 位数字?
String Number; if() { //9 digits }
你有什么想法吗?谢谢。
if (Regex.IsMatch(Number,@"\d{9}")) { //Has 9 digits }
string Number; if (Regex.Match(number, "\d{9}")) { // Number has 9 digits } if (Regex.Match(number, "^\d{9}$")) { // Number is 9 digits only }
我正在使用 ruby 发送一个 http 请求,并接收响应。现在我需要在响应中搜索关键字。我使用 Nokogiri::HTML(response.body) 并且以下是我想要查找关键字的 http 响应的一部分:
#<Nokogiri::XML::Comment:0x0c24940 "\n\t<div s