Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
`
https?://\S+/([^\s/]+\.pdf)$
`
gm
Input 1
http://www.oldsite.com.au/*.pdf https://www.newsite.com/wp-content/uploads/2021/01/*.pdf http://www.test.com/a.b.c.pdf
Substitution
replacement $1
http://www.oldsite.com.au/*.pdf https://www.newsite.com/wp-content/uploads/2021/01/*.pdf http://www.test.com/a.b.c.pdf