Snippets tagged regex

  • Regex Match Index

    A function for interpreting the zero-based index property of a successful regular expression match in terms of line and column numbers.

    22 people like this

    Posted: 7 years ago by Taha Hachana

  • Regular expression active pattern

    Active pattern returning list of captured groups.

    11 people like this

    Posted: 7 years ago by Daniel Robinson

  • Web Crawler

    This snippet features an F# Web crawler that i'm already using in 2 applications (slightly modified). It's based on a scalable network of communicating agents that follow URLs extracted from HTML pages until reaching the specified limit.

    23 people like this

    Posted: 7 years ago by Taha Hachana

  • Count noise-lines in C# code

    This is the code I used to generate this pie chart: http://pic.twitter.com/PgPEFByg56 Enough said?

    9 people like this

    Posted: 5 years ago by Kit Eason

  • cron scheduling

    Parsing cron expression and calculating next launch time from schedule. v 1.1: bugs fixed for case */n + catch bad parsings

    3 people like this

    Posted: 3 years ago by dvitel

  • Regex Applicative Functor

    Give a way to apply captures values on a given function

    1 people like this

    Posted: 2 years ago by cboudereau

  • 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: 7 months ago by Darrell Plank