There are 18 vulgar fraction symbols and I would like to match them in regex.
Is this the best way listing them all
/[¼½¾⅐⅑⅒⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞]/
There are 18 vulgar fraction symbols and I would like to match them in regex.
Is this the best way listing them all
/[¼½¾⅐⅑⅒⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞]/
Share
Improve this question
asked Mar 24, 2018 at 3:06
DanielDaniel
1,1242 gold badges13 silver badges31 bronze badges
1 Answer
Reset to default 14They are Unicode characters.
¼½¾ have the continuous Unicode values (from \u00BC
to \u00BE
), and the rest (⅐⅑⅒⅓⅔⅕⅖⅗⅘⅙⅚⅛⅜⅝⅞) have the continuous Unicode values (from \u2150
to \u215E
).
You can use this [\u00BC-\u00BE\u2150-\u215E]
.