% -*- texinfo -*- % @deftypefn {Function File} {} regexptranslate (@var{op}, @var{s}) % Translate a string for use in a regular expression. This might % include either wildcard replacement or special character escaping. % The behavior can be controlled by the @var{op} that can have the % values % % @table @asis % @item 'wildcard' % The wildcard characters @code{.}, @code{*} and @code{?} are replaced % with wildcards that are appropriate for a regular expression. % For example: % @example % @group % regexptranslate ('wildcard', '*.m') % @result{} '.*\.m' % @end group % @end example % % @item 'escape' % The characters @code{$.?[]}, that have special meaning for regular % expressions are escaped so that they are treated literally. For example: % @example % @group % regexptranslate ('escape', '12.5') % @result{} '12\.5' % @end group % @end example % @end table % @seealso{regexp, regexpi, regexprep} % @end deftypefn