Thread: Regex examples
View Single Post
Old 06-08-2013, 04:01 AM   #241
abeonis
eBook DIYer
abeonis began at the beginning.
 
abeonis's Avatar
 
Posts: 111
Karma: 10
Join Date: Oct 2012
Location: Europe
Device: K4, KF HD 8.9, Readium
Quote:
Originally Posted by DiapDealer View Post
Code:
\p{Lu}
Will catch all upper-case letters (including unicode characters), if that's what you're looking for. Add parentheses to make it a capture group if desired, of course.
I didnīt know this one. I have twice this problem as I write in french and spanish (2x exotic characters) and want to use the same regex.
  • The fist method I used was the looooonnnnnngggggggg enumeration of all possible characters in both languages
  • Then I started using the interval [€-ĸ] that contains only the exotic characters and added it to other intervals
Your method is still more elegant

Last edited by abeonis; 06-08-2013 at 04:19 AM. Reason: I speak english as a spanish cow
abeonis is offline   Reply With Quote