So if you have the following string: "$(document).ready(function() {"
There are three open parentheses "("
I know there is the good 'ol string.replace(/(/g, "replacement_string"); way of doing things, but lets just say that doesn't exist for this question.
Now lets say I have a function that does replaces "(" with "?". Is there a way to perform the function once for every "(" in the string?