+4 votes
322 views

I’m a Regular Expressions nerd. While I was writing a regex to look for verses with no ending punctuation:
[^\\][^\p{P}\d]\r\n\\v
or
[^\\l][^\p{P}\d]\r\n\\v \d+ \p{Lu}
, I realized that the C# flavor of RegEx in RegexPal (and FLEx filtering/Process) supports shorthand (not longhand) Unicode character categories.

Some of the most useful are:

  • \p{L} Letter (nearly any orthography)
  • \p{Lu} Uppercase letter
  • \p{Ll} Lowercase letter
  • \p{P} Punctuation
  • \p{M} Any diacritic

If the P after the slash is capital, it means NOT that character class.

  • \P{L} Any non-letter

The whole list:

  • \p{L}: any kind of letter from any language.
    • \p{Ll}: a lowercase letter that has an uppercase variant.
    • \p{Lu}: an uppercase letter that has a lowercase variant.
    • \p{Lt}: a letter that appears at the start of a word when only the first letter of the word is capitalized.
    • \p{L&}: a letter that exists in lowercase and uppercase variants (combination of Ll, Lu and Lt).
    • \p{Lm}: a special character that is used like a letter.
    • \p{Lo}: a letter or ideograph that does not have lowercase and uppercase variants.
  • \p{M}: a character intended to be combined with another character (e.g. accents, umlauts, enclosing boxes, etc.).
    • \p{Mn}: a character intended to be combined with another character without taking up extra space (e.g. accents, umlauts, etc.).
    • \p{Mc}: a character intended to be combined with another character that takes up extra space (vowel signs in many Eastern languages).
    • \p{Me}: a character that encloses the character it is combined with (circle, square, keycap, etc.).
  • \p{Z}: any kind of whitespace or invisible separator.
    • \p{Zs}: a whitespace character that is invisible, but does take up space.
    • \p{Zl}: line separator character U+2028.
    • \p{Zp}: paragraph separator character U+2029.
  • \p{S}: math symbols, currency signs, dingbats, box-drawing characters, etc.
    • \p{Sm}: any mathematical symbol.
    • \p{Sc}: any currency sign.
    • \p{Sk}: a combining character (mark) as a full character on its own.
    • \p{So}: various symbols that are not math symbols, currency signs, or combining characters.
  • \p{N}: any kind of numeric character in any script.
    • \p{Nd}: a digit zero through nine in any script except ideographic scripts.
    • \p{Nl}: a number that looks like a letter, such as a Roman numeral.
    • \p{No}: a superscript or subscript digit, or a number that is not a digit 0–9 (excluding numbers from ideographic scripts).
  • \p{P}: any kind of punctuation character.
    • \p{Pd}: any kind of hyphen or dash.
    • \p{Ps}: any kind of opening bracket.
    • \p{Pe}: any kind of closing bracket.
    • \p{Pi}: any kind of opening quote.
    • \p{Pf}: any kind of closing quote.
    • \p{Pc}: a punctuation character such as an underscore that connects words.
    • \p{Po}: any kind of punctuation character that is not a dash, bracket, quote or connector.
  • \p{C}: invisible control characters and unused code points.
    • \p{Cc}: an ASCII or Latin-1 control character: 0x00–0x1F and 0x7F–0x9F.
    • \p{Cf}: invisible formatting indicator.
    • \p{Co}: any code point reserved for private use.
    • \p{Cs}: one half of a surrogate pair in UTF-16 encoding.
    • \p{Cn}: any code point to which no character has been assigned.

Full Documentation:
https://www.regular-expressions.info/unicode.html#category

Paratext by (231 points)
reshown | 322 views

1 Answer

0 votes
***** Added to remove this comment from unanswered questions *****
by (9.8k points)

Related questions

0 votes
3 answers 376 views
Paratext ships with the cross reference list from the GNT92 (Short Bible Reference System, edited by Robert G. ... Or does every new translation simply reuse the GNT92 list?
LivingField 607 asked Oct 29, 2018
0 votes
0 answers 128 views
Are there ways to display genealogy information that helps make sense of what can be a textual maze? I've looked ... just wonder what others have done-if anything. Thanks, Paul
Paul 642 asked Aug 4, 2015
0 votes
1 answer 10 views
<!--[if gte mso 9]> Normal 0 false false false EN-US EN-CA AR-SA MicrosoftInternetExplorer4 <![endif]--><!--[if gte mso ... .5.101.3 installed, whereas I am still using 9.4.101.25.
Kamesa49 102 asked Sep 6, 2025
0 votes
2 answers 546 views
Dear reader. I would like to find \fq followed by any string thing including ɛ ɔ ɲ ŋ until the first \\ft ... the search to the first non-occurance? Thanks in advance, Bart
goodgoan 347 asked Aug 3, 2023
+1 vote
5 answers 807 views
I want to change lowercase to uppercase in certain situations - for instance I want to change all lowercase after a colon to ... very simple list and then adding to it as you go.
Phil_Leckrone 9.8k asked Mar 2, 2022
Welcome to Support Bible, where you can ask questions and receive answers from other members of the community.
Finally, all of you, be like-minded, be sympathetic, love one another, be compassionate and humble.
1 Peter 3:8
3,037 questions
5,995 answers
5,661 comments
2,022 users