My Basic aim is to extract a stringFP009Y260KP from the input String. I tried as below. But my code fetches me as FP009Y260KP/X_008_01_17_16_FP009Y260KPwhich is incorrect. How do I fetch FP009Y260KP alone.
What you are matching is FP then any number of anything else until you reach KP. It appears to be acting in a "greedy" fashion. Go through the Regular Expression part of the Java Tutorial and look particularly for greedy and reluctant quantifiers, etc.
Joined: Jan 13, 2008
Thanks. I could do it through reluctant quantifier. And it works fine now.