'Regex to match a word used with any font or case
Here's what I want: a regex expression that can match the word "hello" in any font and case. So it would match Hello, heLLo, HelLo, 🄷🄴🄻🄻🄾, 𝐇𝐞𝐥𝐥𝐨, etc.
This is for a Discord bot that is written in Javascript, but I enter the regex via commands on Discord.
I feel like I'm close with Unicode, but can't quite find an answer. I'm very new to this, but here are the resources I've already explored:
Regular expression to match non-ASCII characters
Regex any ASCII character
https://www.regular-expressions.info/unicode.html
I've used [\u00BF-\u1FFF\u2C00-\uD7FF\w]{h} but it doesn't match the strange fonts.
Solution 1:[1]
This matches all of your samples.
/([^\x00-\x7F]?\w?)/"ug
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
