I have Indian stock market data with codes like ACC-I.NFO, ACC-II.NFO, ACC-III.NFO which represents futures data for coming months. The data also have other information. If i want to filter the data with this pattern, i am unable to find a suitable regex. Some of the regex i tries are filtering out -I.NFO but not able to filter out -II.NFO, -III.NFO values. Some of the regex is confusing because the code may looks like bajaj-auto-I.NFO. Can you please help me out with regex which can filter these values.
I have tried ^([A-Z]+(?:-[A-Z]+)*)-([I-III]).NFO$ but its not working.
Raghav D is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.