So, we need to know that javascript links do not necessarily have semicolon
after a closing bracket.
Keep it in mind when building your own regexp. Or, forget about it and adopt
the simplified regexp that was already suggested here:

javascript:[_a-zA-Z0-9]+ *\( *['"]([^'"]+)['"]

This regexp , in a string "javascript:popup('/freelimits.html',400,300)"
stops at the second single quote and does not check anything further.