There is a simple C++ method to use pattern matching on strings? The code should sound like this:
if (regexpcmp('l?nole*[0-9]', 'linoleum1')) { //we have a match! } else { //no match }
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not in the core language. Use Boost.Regex or an external library like
pcre. In a unix environment you almost certainly have access to the BSD regular expression tools (regcomp,regerror,regexec,regfree) which are c-like rather than c++-like but do work.