Text Processingflags: g
Sentence Boundary
Matches sentence boundaries (punctuation followed by whitespace and a capital letter).
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
[.!?]\s+(?=[A-Z]) (flags: g)Raw source: [.!?]\s+(?=[A-Z])
How it works
`[.!?]` matches terminating punctuation. `\s+` matches whitespace. `(?=[A-Z])` is a lookahead for a capital letter (marks where the next sentence begins).
Examples
Input
Hello world. How are you? I'm fine!Matches
.?
Common use cases
- •Sentence splitting
- •NLP preprocessing
- •Reading-level analysis
Related patterns
Word Boundary (Whole Word Match)
Text ProcessingMatch the whole word `cat` without matching it inside other words like `concatenate` or `category`.
Hashtag
Text ProcessingMatch hashtags (# followed by word characters) in social media posts, including accented Latin characters.
JSON Boolean / Null Literal
Text ProcessingMatch JSON `true`, `false`, and `null` literal values, with word boundaries to avoid partial matches.
Positive Lookahead (Password)
Text ProcessingUse positive lookahead `(?=...)` to require the password contain at least one digit and one uppercase letter.