I'm trying to find the regex in java that matches a substring with TTFI within a string TTFI
I'm using /TTFI/ to match the string TTFI in a string such as TTFI1233
When using the folllowing URL http://www.regexplanet.com/advanced/java/index.html to check, it results matches() No
The fiddle URL is : http://fiddle.re/e3y2
Thanks, Nav
反斜杠不是正则表达式的一部分,而是perl,javascript等中使用的特定于语言的分隔符。还要注意,Java RE要求整个字符串都匹配-使用.*TTFI.*
可以完美匹配您的输入。
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.