iOS - regex to match word boundary, including underscore
问题 I have a regex that I'm trying to run to match a variety of search terms. For example: the search "old" should match: -> age_old -> old_age but not -> bold - as it's not at the start of the word To do this, I was using a word boundary. However, word boundary doesn't take into account underscores. As mentioned here, there are work arounds available in other languages. Unfortunately, with NSRegularExpression, this doesn't look possible. Is there any other way to get a word boundary to work? Or