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.
我正在使用 GREL 在 Open Refine 中清理数据。我正在尝试将字符串 OOL 附加到字符串 SCH,前提是 SCH 位于任何单元格的底部。我会很感激任何提示。
Miquel Centelles
假设当您说“如果 SCH 位于任何单元格的底部”时,您的意思是 SCH 是字符串中的最后三个字符,那么您可以在“if”函数中使用 GREL 函数“endsWith”:
if(value.endsWith("SCH"),value+"OOL",value)
如果字符串以 SCH 结尾,这将添加“OOL”,否则它将保留字符串原来的样子