By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
tag | REGEXP_REPLACE(tag, '(<a href="https?://(?:[^/]+/){3}).*">', '$1">') |
---|---|
<a href="https://website.com/cours/les-problemes/lecon/s1-2014-2015-mathematiques-les-problemes/"> | <a href="https://website.com/cours/les-problemes/"> |
<a href="https://website.com/cours/la-division/lecon/s3-2014-2015-mathematiques-la-division-n-nakatani/"> | <a href="https://website.com/cours/la-division/"> |
<a href="https://website.com/cours/mathematiques-larithmetique/lecon/201819-s5-fa-mathematiques-nathalie-nakatani/"> | <a href="https://website.com/cours/mathematiques-larithmetique/"> |