Match all characters up until a word boundary
问题 Based off Regex Until But Not Including, I'm trying to match all characters up until a word boundary. For example - matching apple in the following string: apple < I'm doing that using: a negated set [^] with a word boundary \b and a plus + repeater Like this: /a[^\b]+/ Which should look for an "a" and then grab one or more matches for any character that is not a word boundary. So I would expect it to stop before < which is at the end of the word Demo in Regexr Demo in StackSnippets var input