我正在尝试匹配较大内容块的部分,并且只想匹配字符串开头或前面有空格的内容,我只想匹配字符串结尾或后面的内容空间。不幸的是,我的 regex-fu 太弱了,无法自己解决这个问题。帮助我 Stack Overflow,你是我唯一的希望。
基本上这些都应该匹配“the-thing-to-match”;
the-thing-to-match blah
blah the-thing-to-match
blah the-thing-to-match blah
Run Code Online (Sandbox Code Playgroud)