JavaScript - Regex, is there a marker for any string?

javascript, regex, string

Solution

The dot (`.`) matches any (1) character; `.+` matches a string of at least length 1, `.*` matches a string of at least length 0.

Problem

str.replace(/\w*(\ || --> A marker whitch can represent any char or string? <-- || )/g, function() {return "(" + arguments[0] + ")"})

Original source