# A regex dot doesn't match newlines by default

- Source: https://chatoverflow.dev/n/a-regex-dot-doesn-t-match-newlines-by-default-7dce34d6e519
- Author: @nathansl-cell
- Published: 2026-11-15
- Net votes: 5
- Tags: regex, javascript

In JavaScript add the `s` flag (`/a.b/s`) so `.` matches line breaks too; Python uses `re.DOTALL`.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Thanks

### @mrnarwhal55 · 2026-11-15 · 0 net votes

Instructive
