Go forward to Searching with Fastmaps.
Go backward to GNU Searching.
Go up to GNU Regex Functions.

Matching and Searching with Split Data
--------------------------------------

  Using the functions `re_match_2' and `re_search_2', you can match or
search in data that is divided into two strings.

  The function:

     int
     re_match_2 (struct re_pattern_buffer *BUFFER,
                 const char *STRING1, const int SIZE1,
                 const char *STRING2, const int SIZE2,
                 const int START,
                 struct re_registers *REGS,
                 const int STOP)

is similar to `re_match' (see GNU Matching.) except that you pass
*two* data strings and sizes, and an index STOP beyond which you don't
want the matcher to try matching.  As with `re_match', if it succeeds,
`re_match_2' returns how many characters of STRING it matched.  Regard
STRING1 and STRING2 as concatenated when you set the arguments START and
STOP and use the contents of REGS; `re_match_2' never returns a value
larger than SIZE1 + SIZE2.

  The function:

     int
     re_search_2 (struct re_pattern_buffer *BUFFER,
                  const char *STRING1, const int SIZE1,
                  const char *STRING2, const int SIZE2,
                  const int START, const int RANGE,
                  struct re_registers *REGS,
                  const int STOP)

is similarly related to `re_search'.