Remove string before the - character
Hi,
I am trying to split out a string. E.G "Australia - VIC". I want to remove everything before the -. The line of code I am using to do this is:
var
state = optionText.replace(/.* \- /,
""
);
This works in IE7, but in all other browsers is only removing the - resulting in "Australia VIC" rather than the desired "VIC"
Please help!