JavaScript does not support possessive quantifiers. The error you are seeing occurs because the +
can only be used as a greedy one-or-more quantifier.
The chart you reference is from Oracle, and is explaining the quantifiers supported by Java, not JavaScript.
You don’t need to resort to anything special to do the kind of matching you want.
If you want to match “a string ending in a /
, with no other slashes in it, you can use:
/^[^/]+\/$/
Start of string, one or more non-slashes, followed by a slash, followed by the end of the string.