Thread: Regex examples
View Single Post
Old 08-16-2013, 07:41 AM   #282
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,734
Karma: 206739468
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Leonatus View Post
@DiapDealer: {Ll}: I don't understand neither the meaning of "L" or of the pipe. Which is their general function?
That's actually a lowercase "L" rather than a pipe.

\p{L} matches any letter character in any language
\p{Ll} matches any lowercase letter character in any language
\p{Lu} matches any uppercase letter character in any language

Even books in English use accented characters that will be overlooked by [a-z].

NOTE: the L or the Ll or the Lu have no special regex meaning outside of the \p{} construct. They simply represent unicode properties/categories. \p{} matches a single character belonging to the specified category, and \P{} matches a single character NOT belonging to the specified category.
http://www.regular-expressions.info/unicode.html

Last edited by DiapDealer; 08-16-2013 at 08:05 AM.
DiapDealer is offline   Reply With Quote