comparison scripts/strings/regexptranslate.m @ 7983:91d020444da7

Document regexptranslate
author David Bateman <dbateman@free.fr>
date Sun, 27 Jul 2008 02:42:57 +0200
parents cc31c5002c96
children 502e58a0d44f
comparison
equal deleted inserted replaced
7982:4e0fa430f840 7983:91d020444da7
15 ## You should have received a copy of the GNU General Public License 15 ## You should have received a copy of the GNU General Public License
16 ## along with Octave; see the file COPYING. If not, see 16 ## along with Octave; see the file COPYING. If not, see
17 ## <http://www.gnu.org/licenses/>. 17 ## <http://www.gnu.org/licenses/>.
18 18
19 ## -*- texinfo -*- 19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {} realsqrt (@var{x}) 20 ## @deftypefn {Function File} {} regexptranslate (@var{op}, @var{s})
21 ## Return the real natural logarithm of @var{x}. If any element results in the 21 ## Translate a string for use in a regular expression. This might
22 ## return value being complex @code{reallog} produces an error. 22 ## include either wildcard replacement or special character escaping.
23 ## @seealso{log, realsqrt, realpow} 23 ## The behavior can be controlled by the @var{op} that can have the
24 ## values
25 ##
26 ## @table @asis
27 ## @item "wildcard"
28 ## The wildcard characters @code{.}, @code{*} and @code{?} are replaced
29 ## with wildcards that are appropriate for a regular expression.
30 ##
31 ## @item "escape"
32 ## The characters @code{$.?[]}, that have special meaning for regular
33 ## expressions are escaped so that they are treated literally.
34 ## @end table
24 ## @end deftypefn 35 ## @end deftypefn
25 36
26 function y = regexptranslate (op, x) 37 function y = regexptranslate (op, x)
27 38
28 if (ischar (op)) 39 if (ischar (op))