1 /$object//[\p{L}]+(?[^\S\n]+)/u.source/g hello world ^ 0 1 select-inner up .seek.object { input: $object, inner: true } hello world ^^^^^ 0 1 select-inner x up .seek.object { input: $object, inner: true } hello world ^^^^^ 0