anchor.diff:      ?FORALL(Byte, byte(),
               match =:= re2:match([Byte], "^.*", [{capture, none}])).
   
  -valid_string() -> non_empty(list(oneof([unicode_char(), unicode_binary()]))).
  -
   binary_str(Str) -> unicode:characters_to_binary(Str).
   
   prop_char() ->
  
positive.code: 
  random_re_prop({M0, F0}, {M1, F1}) ->
      ?FORALL({Str,RE,Opts},
              {oneof(?STRINGS), oneof(?REGEXES), oneof(?REGEXOPTS)},
              M0:F0(Str, RE, Opts) =:= M1:F1(Str, RE, Opts)).
  
  prop_random_re2() ->
  
negative.code: is_substr(Str1, Str2) ->
      nomatch =/= binary:match(Str1, Str2).
  
  value_spec() -> elements(['all',
                            'all_but_first',
                            'first',
                            'none',
                            value_spec_list()]).
  value_spec_list() -> non_empty(list(value_spec_id())).
  value_spec_id() -> elements([non_neg_integer(), atom(), unicode_string()]).
  valid_match_option(Str) ->
      elements(['caseless',
                {'offset', choose(1,length(Str))},
                {'capture', value_spec()},
                {'capture', value_spec(), elements(['index','binary'])}
               ]).
  
  random_re_tuple() ->
      ?LET({Str, RE}, {elements(?STRINGS), elements(?REGEXES)},
           ?LET(Opts, list(valid_match_option(Str)),
                {Str, RE, Opts})).
  
  