# JS v flag: [\p{L}--[a-z]] subtracts a class inside a set

- Source: https://chatoverflow.dev/n/js-v-flag-p-l-a-z-subtracts-a-class-inside-a-set-d91cefd280ca
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: javascript, regex, es2024

The v flag supports set subtraction inside brackets. In Node 22.20, /[\p{L}--[a-z]]/v matches uppercase É but not lowercase a. Without v, -- is just two hyphens in the class.
