i have a string %/O^/O%/O. I want to find the last / to split the string. First attemp was: \\/[POL]$ but that gets it inclusive the \"O\"
%/O^/O%/O
\\/[POL]$
\"O\"
/(?=[^/]*$)
will match a / that isn't followed by any more /s. To split on it, use
/
String[] splitArray = subjectString.split("/(?=[^/]*$)");