I have some data which is built like this:
where bbb and ccc vary in length.
I want to extract the last segment of the string, after the second ",". Using the Function Editor:
from qgis.core import * from qgis.gui import * @qgsfunction(args='auto', group='Custom') def sp_split(value1): return value1.split(",")
Pressing More Info gives me this explanation:
Eval Error: sp_split() takes exactly 1 argument (3 given)
What might be the reason for that? I'm at a loss here. I'm using the function because of the split, if there is another way of using the built-in expression to retain the "ccc" part, I'll gladly use it.