Learn R Programming

rex (version 0.1.0)

lookarounds: Lookarounds

Description

Lookarounds

Usage

x %if_next_is% y

x %if_next_isnt% y

x %if_prev_is% y

x %if_prev_isnt% y

Arguments

x
A regex pattern.
y
A regex pattern.

Details

These functions provide an interface to perl lookarounds.

Special binary functions are used to infer an ordering, since often you might wish to match a word / set of characters conditional on the start and end of that word.

  • %if_next_is%:TRUEif x follows y
  • %if_next_isnt%:TRUEif x does not follow y
  • %if_prev_is%:TRUEif y comes before x
  • %if_prev_isnt%:TRUEif y does not come before x

See Also

Perl 5 Documentation http://perldoc.perl.org/perlre.html#Extended-Patterns

Other rex: ., capture, capture_group; %or%, or; any_of, character_class, except, except_any_of, except_some_of, exclude_range, none_of, one_of, range, some_of; at_least, at_most, between, counts, n, n_times; group; maybe, one_or_more, wildcards, zero_or_more, zero_or_one; not; rex, rex_; shortcuts