---
title: Regular expressions
kind: note
description: A regular expression (shortened as regex or regexp; sometimes referred to as rational expression ) is a sequence of characters that specifies a match pattern in text. Usually such patterns are used by…
words: 74
readingMinutes: 1
created: '2024-06-12T19:16:18+02:00'
updated: '2024-06-12T19:16:18+02:00'
---
> A regular expression (shortened as regex or regexp; sometimes referred to as rational expression ) is **a sequence of characters that specifies a match pattern in text.** Usually such patterns are used by string-searching algorithms for "find" or "find and replace" operations on strings, or for input validation.
## Resources
- [RegExr](https://regexr.com/)
	- > Learn, Build & Test RegEx
- [regex101](https://regex101.com/)
	- > build, test, and debug regex
- [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
- [Microsoft](https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference)
- [txt2re](https://txt2re.com/)
## Often used snippets
### Lines with nothing but whitespace
```
^(\s)*$\n
```
