Menü schliessen
Created: December 3rd 2013
Last updated: May 1st 2020
Categories: Common Web Development
Author: Marcus Fleuti

Regex to find an URL (containing umlaute) within an HTML A-HREF tag

Tags:  a href,  german,  regex,  regexlib.com,  umlaute,  url

This regex will find an URL within an HTML A HREF tag. The basic regex we found on regexlib.com but we had to slightly modify it to allow German umlaute as well:

(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#äöüÄÖÜ]*[\w\-\@?^=%&\/~\+#])?