WiktionaryDumps to words: Difference between revisions

(→‎{{header|Java}}: Fixed regex using Pattern.DOTALL)
(→‎{{header|OCaml}}: Fixed regexp)
Line 100:
match !tag_path with [] -> false
| hd :: _ -> hd = tag
in
let reg = Str.regexp_string "==French==" in
let matches s =
try let _ = Str.search_forward reg s 0 in true
with Not_found -> false
in
while not (Xmlm.eoi i) do
Line 111 ⟶ 116:
if last_tag_is "text"
then begin
letif regmatches = Str.regexp_string "==French==" ins
if Str.string_match reg s 0
then print_endline !title
end