PDA

View Full Version : Using QRegExp For File Filtering



QbelcorT
5th April 2009, 04:44
Hi,
I am using QDir::entryList to obtain the files in a directory. I set a filter for *.jpg and *.bmp. I want to filter files from user1-16.jpg OR user1-16.bmp.
Does anyone have an example of how I can write an expression to filter for files 'user1.jpg,user2.jpg,user3.jpg OR userX.bmp.
Thank you

wysota
5th April 2009, 10:02
QRegExp(".*\\.(bmp|jpg)");