我想检索所有关键字正则表达式 - 关键字
我的关键字列表的最后出现之后出现的词中最后一次出现后如何检索词 - 与,或,不是
的例子
input = "tom hanks and hugh jack"
output = hugh jack
input ="tom hanks and hugh jack or bill bob"
output = bill bob
input ="tom hanks and hugh jack or bill bob not brad pitt"
output = brad pitt
关键字可以改变吗?它们会一直是“和”,“或”,还是“不”? – talemyn 2013-05-03 18:11:20
这些是唯一的三个关键字 – Surabhi 2013-05-03 18:13:20
这些行中的东西'input.split(/ \ b(?:and | or | not)\ b /)。pop();' – 2013-05-03 18:15:36