c++ - boost regex pattern for special characters -


Do anyone know how to create a boost pattern for special characters in C ++?

This does not just mean ("[azza-j 0-9 \\ s] *")

but _ + - For example string:

"Hello World \\ (special checkers) + defined_with [Boost]" valid

but

"hello world" (special. Cheaters) + defined_ method [boost] " is not valid < P> To be more specific, something like this:

  string input; Galeline (pin, input); Promotion: Regex pattern 1 ("[a-zA-Z0-9 \\] S \\ _ \\ + \\ - \ \\ \\) \\\\ \\ (\\. \\ |] * "); if (! Regex_match (input, pattern 1)) {cout << lt;" Invalid input "& lt; & Lt; endl;}             / P>      

I would recommend leaving a character that will not pass for example:

[^ \\! \\?] + , then Test if

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -