This regular expression is made to capture fully formed chains (^ assert start of subject and $ assert end of subject) from one or more sub-pattern delimited by the external round brackets followed by the plus sign ( sub-pattern )+.
The sub-pattern includes two alternative sub-patterns (the vertical bar characters separates alternative sub-patterns) the first (\w+) capture one or more "word" character and the second capture one backslash (the \ preceding an other \ specify that the second one stands for itself) followed by any character (the point .). But this last sub-pattern seems very strange ???
See for example this ECMAScript regular expressions pattern syntax page
Otherwise, it would be more efficient to specify the patterns you want to capture, to build an adapted regular expression...
EDIT : Then this expression capture the string : 'John\jPaul\p' as evidenced by this test :
[COLOR="#0000FF"]// Remark : the captured backslash do not appears with the alert[/COLOR]
alert('John\j'); [COLOR="#0000FF"]//=>Johnj [/COLOR]
The match method result is an array of all captured patterns and sub-patterns. Then the patterns seems to be captured many times...