I have JS file and I need to parse that array in it:
something: ['Prefix.All','Ignore.Me','Prefix.Another']
I need to get all elements from "something" array with defined prefix. Now I can get it, if array will contain only one element. My regexp:
String: something: ['Prefix.All']
Can get element with:
/something\s*:\s*\[['"](Prefix[a-zA-Z0-9.]+)['"]]/
But how to find many elements in array? And how to find more than one "something" array in file?
Prefix.AllI would suggest you to split it bycomma...[, find last]. take substring in[ ], split it by,. find all substrings, that have prefixPrefix. Why you think, that regexp can really helps you?