[英]Regular expression - match character(s) at the end without using $ sign
Kindly visit this link.
请访问此链接。
Here it wants me to match a few set of words and a few must not be matched. 在这里它要我匹配几组单词,而有些则不能匹配。
The problem is that it is not allowing me to use $
sign. 问题是它不允许我使用
$
符号。
I am not able to figure out how to do it.. 我不知道该怎么做。
A detailed explanation or link to the same will be a great help. 详细说明或指向该说明的链接将有很大帮助。
I just found out the solution with word boundaries 我刚刚找到单词边界的解决方案
/u\\b/
This did the trick. 这成功了。
You can use fu(?!.)
for those samples. 您可以将
fu(?!.)
用于这些样本。 You can even omit the f
for a better score. 您甚至可以省略
f
以获得更好的分数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.