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.
我想保留一个只有字母、数字或下划线的字符串。但是,当我使用
gsub('[^A-z0-9_]',"","some lab value (x10^9L)")
我明白了
[1] "somelabvaluex10^9L"
这是出乎意料的,因为^字符保留在字符串中。我尝试了不同的选择,但没有任何运气。
^