How do I get the content after the last comma in a string using a regular expression?
Example:
abcd,fg;ijkl, cas
The output should
I used the answers to solve my problem, it just need to extract the file name from path,
String s = "C:\\\\Users\\\\Blue Tag\\\\Files\\\\Upload\\\\samplejpg.jpg"; String result = s.substring(s.lastIndexOf('\\') + 1).trim();