Changing case with regex_format
The following useful Perl expressions seem to have been omitted from regex_format: \l lowercase next char \u uppercase next char \L lowercase till \E \U uppercase till \E \E end case modification Was there a good reason for that? The only way I can see to implement those expressions is to take a copy of regex_format.hpp, then hack _reg_format_aux. I think that it would also be necessary to change the undocumented regex_traits class, to do upper case conversion, as it only seems to do lower casing at present. Is there an easier way? Thanks, Keith MacDonald
The following useful Perl expressions seem to have been omitted from regex_format:
\l lowercase next char \u uppercase next char \L lowercase till \E \U uppercase till \E \E end case modification
Was there a good reason for that?
Yes, I forgot, and no-one else has asked for them until now, I'll put them on my todo list.
The only way I can see to implement those expressions is to take a copy of regex_format.hpp, then hack _reg_format_aux. I think that it would also be necessary to change the undocumented regex_traits class, to do upper case conversion, as it only seems to do lower casing at present. Is there an easier way?
Probably not :-( The traits class is about to undergo big changes this year as well (which is the reason for removing it's documentation from the last release), so it's probably best to restrict your changes to reg_format_aux if you want to hack your own copy. John.
participants (2)
-
John Maddock
-
Keith MacDonald