RegExpCursor word boundary matching

Hello,
I am trying use RegExpCursor to search for certain values entered in the editor, however I would like some of my regex to use word boundaries, so far word boundaries seems to be ignored when added to the regex.
e.g with text abc abcdef 123abc 123abcdef I would expect new RegExpCursor(view.state.doc, '\babc\b') to have 1 match instead I am getting 4 matches. Is this possible with RegExpCursor?

new RegExpCursor(view.state.doc, '\\babc\\b') (single backslashes in string literals won’t produce actual backslashes)

that works, thank you