Functional style Regex engine
21 people like thisPosted: 14 years ago by Nick Palladinos
This function produces safe URLs for Web requests or URI construction. It forces the pattern: http:// + www. OR subdomain. + domain + absolute path. When used in an application that takes URLs as input, the user would be able to type "example.com" instead of "http://example.com" or "http://www.example.com". It also supports domains like google.co.uk or google.com.au.
8 people like thisPosted: 13 years ago by Taha Hachana
Perl Style "Regex Matches?" operator
49 people like thisPosted: 13 years ago by fholm
This is the code I used to generate this pie chart: http://pic.twitter.com/PgPEFByg56 Enough said?
9 people like thisPosted: 11 years ago by Kit Eason
A staged a regular expression interpreter is a compiler!!!
4 people like thisPosted: 8 years ago by Nick Palladinos
This checks if a string contains all uppercase characters.
5 people like thisPosted: 6 years ago by LuisFX
An example of setting up a MatchEvaluator for use with Regex.Replace in F#.
4 people like thisPosted: 6 years ago by stubel
Active pattern returning list of captured groups with parsing.
0 people like thisPosted: 3 years ago by Evgeniy Andreev
Use a regular expression to find all groups of three digits before the decimal point. Returns the modified string.
3 people like thisPosted: 2 years ago by shazmodan
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 thisPosted: 13 years ago by Taha Hachana
Active pattern returning list of captured groups.
11 people like thisPosted: 13 years ago by Daniel Robinson
Regex match via Active Patterns with Type based value extraction.
5 people like thisPosted: 13 years ago by Nick Palladinos
Parsing cron expression and calculating next launch time from schedule. v 1.1: bugs fixed for case */n + catch bad parsings
4 people like thisPosted: 9 years ago by dvitel
Give a way to apply captures values on a given function
1 people like thisPosted: 8 years ago by cboudereau
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 thisPosted: 6 years ago by Darrell Plank
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.
8 people like thisPosted: 3 years ago by Taha Hachana
There are some nuances to using the regular expression type provider that are easy to miss. This snippet addresses them.
7 people like thisPosted: 2 years ago by musicologyman