I have a following userName
: iphone6s_taylor
and iphone6+_taylor
.
to find them in text I have created following regular expression:
let regex = "\\B@\(userName)\\b"
But within the following text:
let text = "@iphone6s_taylor @iphone6+_taylor @iphone6+_taylor"
only the first one is found. How to change the regex to find every of them?