Created
September 29, 2013 09:41
-
-
Save funrep/6750974 to your computer and use it in GitHub Desktop.
Racket regexp fails.
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
(define (parse s) | |
(regexp-match #rx"^(?:[:](\S+) )?(\S+)(?: (?!:)(.+?))?(?: [:](.+))?$" s)) | |
; regexp code taken from here http://mybuddymichael.com/writings/a-regular-expression-for-irc-messages.html |
Author
funrep
commented
Sep 29, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment