我有许多与产品相关的字符串。这些中的每一个都有参考号,我想创建一个正则表达式,如果不止一次提到不同的参考号,它会拾取。因此,给出以下示例:
"AB01 MyProduct" >>> No match - because there is only one ID
"AB02 MyOtherProduct" >>> No match - because there is only one ID
"AB03 YetAnotherProduct" >>> No match - because there is only one ID
"AnAccessory for AB01, AB02, AB03 or AB101" >>> Matches!!
"AB02 MyOtherProduct, MyOtherProduct called the AB02" >>> No match - because the codes are the same
谁能给我一个线索?