Created
June 17, 2024 08:14
-
-
Save aereal/85ed880e4fab34189c404cb306b9790e to your computer and use it in GitHub Desktop.
about regular expression's word boundary implementations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (/\b姉/.test("兄 姉")) console.log("javascript") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say q{perl} if qq{兄 姉} =~ m/\b姉/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts :ruby if /\b姉/ =~ %q{兄 姉} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
refs.
https://tc39.es/ecma262/multipage/text-processing.html#sec-runtime-semantics-iswordchar-abstract-operation
https://tc39.es/ecma262/multipage/text-processing.html#sec-wordcharacters