I'm looking for information on how to split a string.
This method used to work and return the value that I can use to query our Asset Schema:
def hardwareAssetKeyAbrv = hardwareAsset.toString().substring(hardwareAsset.toString().indexOf("(") + 1).replace(")","").replace("[","").replace("]","");
Something has changed, it now returns the key but also additional text so that the results look like: referenceId=115937
I don't know why the text referenceID= is included in the results, this is something new that changed from November to now. The same script worked in November and now does not work.
I need the variable to only return the key, not the extra text. I'm new to groovy script and picking up on code wrote by someone else. Any help appreciated!