Regexp

Regular expressions using PCRE engine.

'regexp regexp_new_options(reg : string, options : string) Build a new regexpr with the following options :
  • i : case insensitive matching
  • s : . match anything including newlines
  • m : treat the input as a multiline string
  • u : run in utf8 mode
  • g : turn off greedy behavior
'regexp regexp_new(string) Build a new regexp bool regexp_match('regexp, string, pos : int, len : int) Match len chars of a string starting at pos using the regexp. Return true if match found string regexp_replace('regexp, from : string, by : string) Perform a replacement using a regexp string regexp_replace_all('regexp, from : string, by : string) Perform a replacement of all matched substrings using a regexp string regexp_replace_fun('regexp, from : string, f : (('regexp -> any))) Perform a replacement of all matched substrings by calling f for every match string? regexp_matched('regexp, n : int) Return the nth matched block by the regexp. If n is 0 then return the whole matched substring. If the nth matched block was optional and not matched, returns null { pos => int, len => int} regexp_matched_pos('regexp, n : int) Return the nth matched block position by the regexp. If n is 0 then return the whole matched substring position
Report an issue | Contribute to this page

©2017 Haxe Foundation