470,647 Members | 1,206 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

\l operation in regular expressions

I've started to play around with regexps in Python and I tried
something like this

print re.sub( r'(\bw\w+\b)', r'\u\1', 'will it work')

and get

\uwill it \uwork

when I had expected

Will it Work

I tried to find some documentation about this but I can't find anything
that says if operations like \l \L \u \U etc are supported or not. It
doesn't look like it supported? What is the "Python way" of doing this,
writing a function and use that as the replacement?
Jul 19 '05 #1
0 945

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Michael McGarry | last post: by
2 posts views Thread by Sehboo | last post: by
4 posts views Thread by EgyŁd Csaba | last post: by
7 posts views Thread by Billa | last post: by
3 posts views Thread by a | last post: by
25 posts views Thread by Mike | last post: by
13 posts views Thread by Wiseman | last post: by
12 posts views Thread by FAQEditor | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.