I am working on the following regex problem that I have almost solved.
The goal is to find the words that start either with special characters or a space and end with one of these words including the period .qvd .txt .xlsx
For example "list.xlsx random %ford.txt #catch.qvd cars roads"
From above string I need to extract the following list.xlsx , ford.txt and catch.qvd
[#%\S]\w+\.+txt
My solution only checks the words that end with .txt. How can I change my regex expression to include .qvd , and .xlsx too