c# - how to match multiple words in string using regex? -


i trying match 3 words can appear anywhere in string:

win enter 

all 3 words must exist in string return match. having issues getting match when 3 words exist.

below regex using: http://regexr.com/39b83

^(?=.*?win)(?=.*?(enter))(?=.*?(now)).* 

regex working when 3 words within same line... when spread out across entire string on different lines, failing match.

any direction or appreciated.

i think c# support (?s) dotall modifier. if yes try below regex,

(?i)(?s)win.*?enter.*?now 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -