Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 grep 检测俄语字符,但目前我所拥有的似乎没有做任何事情:
echo "Ёё" | grep -Eo "/[А-Яа-яЁё]/u"
不返回任何输出。我需要做些什么来告诉 grep 返回输出吗?
没有输出,因为 grep 正在寻找模式/yourletters/u
/yourletters/u
尝试这个:
echo "Ёё" | grep -Eo "[А-Яа-яЁё]*"
在这里测试:
kent$ echo "Ёё" | grep -Eo "[А-Яа-яЁё]*" Ёё