We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ignoreCase
v
Re-using the example from https://v8.dev/features/regexp-v-flag#ignoreCase:
const re1 = /\p{Lowercase_Letter}/giv; const re2 = /[^\P{Lowercase_Letter}]/giv; const string = 'aAbBcC4#'; string.replaceAll(re1, 'X'); // → 'XXXXXX4#' string.replaceAll(re2, 'X'); // → 'XXXXXX4#'
https://babeljs.io/repl/#?code_lz=MYewdgzgLgBATgUwIwwLwwPQB0AOBvAGRAHcE5gBDCBAfQISijIF8MBzASwDcBuAKFCRYiAExpMAbQB6WAAqESZStToMmcZgF123fgPDQY0OBzBtxAcgoBBAEYAhYAGEALAGILe46bYA6RDgANhTACNaBgQAUiEgANDAWABoWAJT8GBgwgEmECYl5-e4WfHzeZv4IQSFhEdEIIvFJqemZOUn5eYVAA&presets=stage-3
This is currently being transpiled into code with different behavior:
const re1 = /\p{Lowercase_Letter}/giu; const re2 = /[^\P{Lowercase_Letter}]/giu; const string = 'aAbBcC4#'; string.replaceAll(re1, 'X'); // → 'XXXXXX4#' string.replaceAll(re2, 'X'); // → 'aAbBcC4#'
cc @nicolo-ribaudo
The text was updated successfully, but these errors were encountered:
Should we compile [^\P{Lowercase_Letter}] down to all its individual code points?
[^\P{Lowercase_Letter}]
Sorry, something went wrong.
nicolo-ribaudo
No branches or pull requests
Re-using the example from https://v8.dev/features/regexp-v-flag#ignoreCase:
https://babeljs.io/repl/#?code_lz=MYewdgzgLgBATgUwIwwLwwPQB0AOBvAGRAHcE5gBDCBAfQISijIF8MBzASwDcBuAKFCRYiAExpMAbQB6WAAqESZStToMmcZgF123fgPDQY0OBzBtxAcgoBBAEYAhYAGEALAGILe46bYA6RDgANhTACNaBgQAUiEgANDAWABoWAJT8GBgwgEmECYl5-e4WfHzeZv4IQSFhEdEIIvFJqemZOUn5eYVAA&presets=stage-3
This is currently being transpiled into code with different behavior:
cc @nicolo-ribaudo
The text was updated successfully, but these errors were encountered: