我只想检测以下字符串:
pets ok
pets yes
pets allowed
pets accepted
pets is/are allowed
pets is/are accepted
pets will be considered
pets will considered
pets is/are considered
pet friendly
反过来也是一样的:
ok pets
yes pets
...
(同上,只是“pets”/“pet”从头到尾)
我想不通。
请,如果你能帮助我改进我目前显然不起作用的模式:
/\\b(pet(?:s)?\\s[negotiable|ok|o\\.k|friendly|accept|allow|possible]+|[ok|yes|accept]+\\spet(?:s)?|pet(?:s)?\\s[will|will\\sbe]+\\s[consider|allow|accept|possible]+)\\b/i"