Top "Character-class" questions

Character classes are regular expression constructs that defines and matches from a list of meta- and literal characters.

Regular expression \p{L} and \p{N}

I am new to regular expressions and have been given the following regular expression: (\p{L}|\p{N}|_|-|\.)* I …

xml regex character-class
How to count uppercase and lowercase letters in a string?

yo, so im trying to make a program that can take string input from the user for instance: "ONCE UPON …

java string character-class
Pattern matching digits does not work in egrep?

Why can't I match the string "1234567-1234567890" with the given regular expression \d{7}-\d{10} with egrep from the shell …

regex grep character-class
Replace all characters not in range (Java String)

How do you replace all of the characters in a string that do not fit a criteria. I'm having trouble …

java regex character-class
How can I exclude some characters from a class?

Say I want to match a "word" character (\w), but exclude "_", or match a whitespace character (\s), but exclude "\t". …

regex perl character-class
Matching (e.g.) a Unicode letter with Java regexps

There are many questions and answers here on StackOverflow that assume a "letter" can be matched in a regexp by […

java regex unicode character-properties character-class
Exclude characters from a character class

Is there a simple way to match all characters in a class except a certain set of them? For example …

regex set-difference character-class