I think @saqib is looking for general approach to his problem. Maybe a bit clearer requirements and possible input could help others suggest a solution Anyways I saw you got some answers here which seem pretty good so I will make assumption you got what you were looking for
Yup I did get some solution on Stackoverflow, but they don’t seem to scale for large datasets. I am working with a large dataset, so I am looking for something that more optimized.
I think this might get you started. Not a complete solution but I think the start of one, in fact very close to one…Hint: Just add more Regex the filter.