最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Regex match all Vular Fractions - Stack Overflow

programmeradmin0浏览0评论

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
Add a ment  | 

1 Answer 1

Reset to default 14

They 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].

发布评论

评论列表(0)

  1. 暂无评论