Snippets tagged regular expression

  • Using the Regex type provider

    There are some nuances to using the regular expression type provider that are easy to miss. This snippet addresses them.

    3 people like this

    Posted: 7 years ago by musicologyman

  • Test string is all UpperCase 2

    There is another "All Uppercase" snippet that does two searches - one to verify that there's at least one upper case letter and one to make sure there are no lowercase letters. "---D" is "uppercase" but "---" is not. I wanted to duplicate that behavior even though it seems a bit questionable, but do it in one regex search. The underappreciated lookahead features of RegEx allow this sort of thing - scanning forward and then rescanning forward so I use that here

    1 people like this

    Posted: 3 years ago by Darrell Plank