正则表达式匹配第三段中的两个字符串之一,即伪代码:
/content/au/(boomer or millenial)/...
示例匹配
/content/au/boomer
/content/au/boomer/male/31
/content/au/millenial/female/29/M
/content/au/millenial/male/18/UM
示例不匹配
/content/au
/content/nz/millenial/male/18/UM
/content/au/genz/male
我试过这个,但无济于事:
^/content/au/(?![^/]*/(?:millenial|boomer))([^/]*)