import re

filterString = '(?:[^\!]|^)\[([^\[\]]+)\]\((?!http)([^()]+)\)'
strings = [
    "[Getting Started](gettingStarted.md)",
    "![Getting Started](gettingStarted.png)",
    "[Getting Started](https://w...content-available-to-author-only...d.com)"
]

for pageContent in strings:
    filteredPage = re.sub(filterString, r"""<a href='#' onclick='requestPage("\2");'>\1</a>""", pageContent)
    print(filteredPage)