Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let hasContent lines =
- let mutable inBlock = false
- let isContent line =
- let startsWith input word =
- Regex.Match(input, @"^\s*" + word,
- RegexOptions.CultureInvariant ||| RegexOptions.IgnoreCase).Success
- match (line:string) with
- | _ when line.Trim().Length = 0 -> false
- | s when startsWith s "Version" -> false
- | s when startsWith s "Attribute" -> false
- | s when startsWith s "Begin" ->
- inBlock <- true
- false
- | s when inBlock && startsWith s "End" ->
- inBlock <- false
- false
- | _ -> not inBlock
- Seq.exists isContent lines
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement