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
Post a Comment