[regex] character sets
I'm working with CBuilder6 and boost boost_1_34_1 and found, that regex expression1("[[:print:]]+"); matches with regex_search the whole string: testtext = "ab\r\ncd ef"; including the linebreak and the white space. I had assumed, that the print-class would consist exactly in the set of characters for which the standard function isprint returns true but isprint returns false for the space characters. Is there there any documentation with the exact enumerations of the different character sets? With Kind Regards, Detlef Meyer-Eltz
I'm working with CBuilder6 and boost boost_1_34_1 and found, that
regex expression1("[[:print:]]+");
matches with regex_search the whole string:
testtext = "ab\r\ncd ef";
including the linebreak and the white space. I had assumed, that the print-class would consist exactly in the set of characters for which the standard function isprint returns true but isprint returns false for the space characters. Is there there any documentation with the exact enumerations of the different character sets?
On Windows the default behavior is to use ::GetStringTypeEx to determine
character classifications: this puts \r and \n as "space" characters which
certainly are printable.
If you wish you could use
basic_regex
participants (2)
-
Detlef Meyer-Eltz
-
John Maddock