onig_sys::onig_match [] [src]

pub unsafe extern fn onig_match(reg: OnigRegex, str: *const OnigUChar, end: *const OnigUChar, at: *const OnigUChar, region: *mut OnigRegion, option: OnigOptionType) -> c_int

Match string and return result and matching region.

int onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, OnigRegion* region, OnigOptionType option)

Returns

normal return: match length (>= 0) not match: ONIG_MISMATCH ( < 0)

Arguments

  1. reg: regex object
  2. str: target string
  3. end: terminate address of target string
  4. at: match address of target string
  5. region: address for return group match range info (NULL is allowed)
  6. option: search time option

    • ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
    • ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
    • ONIG_OPTION_POSIX_REGION region argument is regmatch_t[] type of POSIX API.