diff options
| -rw-r--r-- | challenge-329/hvukman/f#/329_p1.fs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/challenge-329/hvukman/f#/329_p1.fs b/challenge-329/hvukman/f#/329_p1.fs new file mode 100644 index 0000000000..e41216743b --- /dev/null +++ b/challenge-329/hvukman/f#/329_p1.fs @@ -0,0 +1,9 @@ +// Part 1 + +//with regex match and filter distinct + +let splitRuns s = Regex("\d+").Matches(s) |> Seq.cast<Match> |> Seq.map (fun m -> m.Value) |> Seq.toList |> Seq.distinct +printfn "%A" (splitRuns "go21od1lu5c7k") +printfn "%A" (splitRuns "the1weekly2challenge2") +printfn "%A" (splitRuns "4p3e2r1l") +printf "\n" |
