I'm getting an undefined attached to a string at the end after a regex, something like:
var string="test.testA:(number:'1')undefined'
and sometimes it gets attached to the string as
var string2 = "test.testA:(number:'1') and undefined"
basically this could be anywhere and I wanted to remove this using regex. Does regex check if there is undefined present in the string? if not what is the best possible soln for this to remove the "undefined" test present in the string?
Thanks!
undefinedor the whole string where it appears?