How to include ё in [а-я] regexp char interval

前端 未结 3 895
不思量自难忘°
不思量自难忘° 2021-01-07 10:54

Russian alphabet includes the letter ё, which was undeservedly forgotten at beggining of computing.

So, if i want to use a regexp with character diapaso

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-07 11:31

    Is one, but not are beatifull decision: use [/а-ё/] instead of [/а-яё/]. This worked, but letter not in proper direction:

    str = "верёвочка"
    str[/^[а-ё]+$/]
    #=> "верёвочка"
    

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题