A regular expression to match everything until the last dot(.). Can be useful in extracting the filename without the file extension in a string.
/.*(?=\.)/g
Matches:
- regexpattern.com
- regexpattern.min.jpg
- https://regexpattern.com/text.php
See Also:
- Regex To Match Anything Before The First Parenthesis
- Regular Expression To Extract File Extension From String
- Regex To Extract Filename From A Path