I have a string/column something like this
String a = \"000003023_AggregateStopLossLimit_W x3A 973911_2012-12-22.PDF\";
I want to create a subs
final String r = a.replaceAll(" .*?(?=_)", "");
if you print the r, it gave output:
000003023_AggregateStopLossLimit_W_2012-12-22.PDF