Search code examples
c++regexboost-regex

Regular expression 'is invalid'


I'm trying to select with regular expression any file with db extension. My regex is:

*.db  

yet I'm getting error saying that '*' cannot start regular expression? How so, every time I type something like *.exe let's say in windows explorer search box I'm getting what I want, that is every file with .exe extention.
I'm using boost::regex.


Solution

  • I think you would need:

    "(.*\\.db)"
    

    Reference: Click here