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.
我有一个数据类型为数字的列,但存在一个非整数值“[”我想在 pentaho 中使用 javascript 删除它。我已经尝试过这个脚本。有人可以帮忙吗?
var abc = <column_name>.replace(/\D/g,'');
试试这个代码。但我还没有测试。
String str = "a12.334tyz.78x"; str = str.replaceAll("[^\\d.]", "");
try using this var abc = <column_name>.replace(/[^0-9]/g,'') this will return you only string of numbers and than you can parse it to integer.
var abc = <column_name>.replace(/[^0-9]/g,'')