[yunqa.de] Re: Converting upper case strings to lower case with regular expression

  • From: Tobias Rapp <t.rapp@xxxxxxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Thu, 26 Nov 2009 09:49:47 +0100

Sheri wrote:
> DIRegex is used in an editor I use. I and others still wish for this 
> capability. From an exchange we had a couple years ago:
> 
>  >>> this is a suggested enhancement: A few other programs
>  >>> I use or helped design allow "$" to be optionally followed by u,
>  >>> U, l, L, t or T to cause the string referenced to be forced to
>  >>> upper, lower or title case in output.
>  >>    
>  >>
>  >> I already though about case modifiers, but did not add them
>  >> because I could not find a regex replace syntax standard.

In my opinion there seems to be some kind of similar implemented feature in
Perl and Vim:

http://perldoc.perl.org/perlre.html#Escape-sequences
http://www.softpanorama.org/Editors/Vimorama/vim_regular_expressions.shtml

A pattern like "[a-z]+" and a replacement string of "\u\0" turns "hello
world" into "Hello World" and a replacement string of "\U\0" into "HELLO
WORLD".

Tobias

_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: