Mercurial > hg > octave-lyh
comparison scripts/strings/regexptranslate.m @ 9036:58604c45ca74
Cleanup of data types related documentation
Files: data.texi, numbers.texi, strings.texi, container.texi
Use two spaces after a period for increased readibility in Info browser
Spellcheck
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Sat, 21 Mar 2009 15:52:41 -0700 |
parents | eb63fbe60fab |
children | 95c3e38098bf |
comparison
equal
deleted
inserted
replaced
9035:57649dcecb55 | 9036:58604c45ca74 |
---|---|
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} {} regexptranslate (@var{op}, @var{s}) | 20 ## @deftypefn {Function File} {} regexptranslate (@var{op}, @var{s}) |
21 ## Translate a string for use in a regular expression. This might | 21 ## Translate a string for use in a regular expression. This might |
22 ## include either wildcard replacement or special character escaping. | 22 ## include either wildcard replacement or special character escaping. |
23 ## The behavior can be controlled by the @var{op} that can have the | 23 ## The behavior can be controlled by the @var{op} that can have the |
24 ## values | 24 ## values |
25 ## | 25 ## |
26 ## @table @asis | 26 ## @table @asis |
27 ## @item "wildcard" | 27 ## @item "wildcard" |
28 ## The wildcard characters @code{.}, @code{*} and @code{?} are replaced | 28 ## The wildcard characters @code{.}, @code{*} and @code{?} are replaced |
29 ## with wildcards that are appropriate for a regular expression. For example: | 29 ## with wildcards that are appropriate for a regular expression. |
30 ## For example: | |
30 ## @example | 31 ## @example |
31 ## @group | 32 ## @group |
32 ## regexptranslate ("wildcard", "*.m") | 33 ## regexptranslate ("wildcard", "*.m") |
33 ## @result{} ".*\.m" | 34 ## @result{} ".*\.m" |
34 ## @end group | 35 ## @end group |
35 ## @end example | 36 ## @end example |
36 ## | 37 ## |
37 ## @item "escape" | 38 ## @item "escape" |
38 ## The characters @code{$.?[]}, that have special meaning for regular | 39 ## The characters @code{$.?[]}, that have special meaning for regular |
39 ## expressions are escaped so that they are treated literally. For example: | 40 ## expressions are escaped so that they are treated literally. For example: |
40 ## @example | 41 ## @example |
41 ## @group | 42 ## @group |
42 ## regexptranslate ("escape", "12.5") | 43 ## regexptranslate ("escape", "12.5") |
43 ## @result{} "12\.5" | 44 ## @result{} "12\.5" |
44 ## @end group | 45 ## @end group |