I am completely new to F#.
I am trying to parse a markdown file which has some verbatim code sections in it, separated by the ``` blocks. These blocks neednot be the only characters in a line and
\``` this is some code ``` and this is not
is a valid line as well.
If possible, I'd appreciate if the solution uses pure Fsharp way of doing things and perhaps functional designs patterns like Active Patterns.
So far I haven't gone much further than just reading the file.
open System
open System.IO
let readFile path =
File.ReadAllText(path)
// File.ReadAllLines
[<EntryPoint>]
let main argv =
readFile "src/main.md"
|> String.collect (fun ch -> sprintf "%c " ch)
|> printfn "%s"
0
EDIT: I do not want to use any libraries. In Python, this would be a one line code;
re.search('start;(.*)end', s)