Skip to content

Instantly share code, notes, and snippets.

@aereal
Created June 17, 2024 08:14
Show Gist options
  • Save aereal/85ed880e4fab34189c404cb306b9790e to your computer and use it in GitHub Desktop.
Save aereal/85ed880e4fab34189c404cb306b9790e to your computer and use it in GitHub Desktop.
about regular expression's word boundary implementations
if (/\b姉/.test("兄 姉")) console.log("javascript")
say q{perl} if qq{兄 姉} =~ m/\b姉/
puts :ruby if /\b姉/ =~ %q{兄 姉}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment