regex contains string in end 1

regex contains string in end

/.*\.pdf$/

Here is what the above code is Doing:
1. We’re importing the Python module called re.
2. We’re creating a regular expression that will match any string that contains the text “pdf”.
3. We’re creating a regular expression that will match any string that ends with “.pdf”.
4. We’re creating a regular expression that will match any string that starts with “http://” and ends with “.pdf”.
5. We’re creating a regular expression that will match any string that starts with “http://” and ends with “.pdf”, but only if there are no characters between the “http://” and the “.pdf”.

Similar Posts