【发布时间】:2019-09-04 14:04:17
【问题描述】:
我正在寻找出现“data/”的正则表达式,后跟任何字符串,直到空格或字符串结尾?
2 * data/color * 8 - finds "data/color"
2 * data/coloring * 8 / 34 - finds "data/coloring"
color plus 22 data/credit -- finds "data/credit"
尝试了一些例子;
data/[^\S]+\s
data/[^\S]+(\s|^)
data/\w+\s
data/\w+(\s|^)
感谢您在 LUA (corona SDK) 中找到解决方案的帮助;
data\/[^\t ]+
由于某种原因我必须具体说明不能使用“\s”;
data\/[^\s]+ , fails
【问题讨论】: