Well, you can always just use the "C#" way of doing things:

open System.Text.RegularExpressions;;
let s = "this is a test";
let s2 = Regex.Replace(s,@"\s+",",");
s2;;

prints out "this,is,a,test".

etc.

By on 12/28/2007 6:00 PM ()

You can use the Regex class in combination with active patterns to get a perl like effect. I detail how to do this towards the end of this article for InfoQ:
[link:www.infoq.com]

Also DevHawk has run a huge series on parsing, I think he looks at several types of lexing:
[link:devhawk.net]

Cheers,
Rob

By on 12/29/2007 1:24 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper