简体   繁体   English

正则表达式-在不使用$符号的情况下匹配字符

[英]Regular expression - match character(s) at the end without using $ sign

在此处输入图片说明 Kindly visit this link. 请访问此链接。

RegEx Golf 正则高尔夫

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.

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