@micsthepick No, it is not standard. It would only be
very rarely used when it's unclear if the text being looked for would be immediately after a
(?:^|\b|(?w:\b))
. In the specific case you're looking at, it was unclear to me where,
exactly, the Unicode word boundary would end up in the tested text, do to not being familiar with that language and how well the Unicode-based word boundary works with it. SD using the Unicode word boundary was also quite recent at the time that was added, so I may not have been thinking of it at the time. There are, however, ways to write that entry which are not subject to backtracking. For example,
(?<=\W)(?:(?:[^约約](?<=\w))*+|约(?!炮)|約(?!炮))*+(?:约炮|約炮)(?:\w*+|\W*+)(?#slang for sex)
should work for SD and MS (
regex 101). It is, however, notably slower, at leas on MS, taking 198 seconds vs the original's 153 seconds.