I am looking for a pattern which can extract only the search words given in pattern and exclude any other words in between.
So for the input string...
2637:1888 log :[INFO] : create /* some comment*/ table mytab (n numeric)
... I need to extract 'create' and 'table'.
If anything else is in between create and table word I should be getting null. I tried with various combination but I am not able to get much clue
If there is no comment in between create and table word then my pattern works i.e
(create)\s*(table)
What should I do?