Hi,
I have a requirement to filter out some of the specified strings in a given line using regx.. This can be easily achievale using string.macth(). But my requirement is little bit tricky.
I have set of keywords, that needs to be identified in a given string. (My input string contains only one expected keyword). I have to form the regX string and that will find which keyword is available in my input string .
Below the sample input and output
var InString ="one_sam_get_2384823_34534";
var keyList = "one|two|three|four|five";
here my expected result is one
or
var InString ="odfdfg_three_get_2384823_34534";
var keyList = "one|two|three|four|five";
here my expected result is three
earlier i used something like this "/^one/i" to find out the single keyword occurance.
But i am struck up in this multi keyword approach. I appreaciate any guidance.
Cheers
Ramesh Vel