Monday, 15 June 2015

regex - OCaml parse large text -


OCaml, how to strip large multilineered text data using page modules. By ignoring the symbol of the beginning of a new line.

  Let get_info content = again = Str.regexp "\\ (. +? \\)" match straw string_match again with content 0. True - & gt; Print_endline ("- & gt;" ^ (Str.matched_group1 content) ^ "& lt; -") | False - & gt; Print_endline ("not found") ;;  

This example only gives the first line, but some lines require some text.


No comments:

Post a Comment