Heey Timothy,
Maybe you can try something using replaceAll or replaceFirst as described here:
https://docs.mendix.com/refguide6/string-function-calls#replaceall
Hi Timothy,
if you are certain that it always is and will be the last of the ‘,’ in the HTML and there can not be one after, you could create a custom java action with a string as input and a string as output.
public static String replaceLast(String string, String toReplace, String replacement) {
int pos = string.lastIndexOf(toReplace);
if (pos > -1) {
return string.substring(0, pos)
+ replacement
+ string.substring(pos + toReplace.length(), string.length());
} else {
return string;
}
}
from https://stackoverflow.com/questions/2282728/java-replacelast (there also is a version with regex)
otherwise you might want to look at pattern specifiers to apply above to the substring between the HTML tags (depending on how it looks like)