-
-
Save RyanABailey/329ee701b2516e12d202 to your computer and use it in GitHub Desktop.
LINQ Regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var testList = new [] {"You may concatenate a string.", "They have a cat.", "Cat is a feline.", "Her name is Catherine."}; | |
| var regex = new Regex(@"(^|\W)cat", RegexOptions.IgnoreCase | RegexOptions.Multiline); | |
| var matches = testList.Where (l => rexex.IsMatch(l)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment