This shows you the differences between two versions of the page.
en:instrx [2016/08/13 08:59] admin |
en:instrx [2020/02/28 10:46] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Instrx (Function) ===== | ||
- | ==== Format ==== | ||
- | **instrx** ( [[stringexpressions|haystack_string_expression]] , [[regularexpressions|regular_expression]] )\\ | ||
- | **instrx** ( [[stringexpressions|haystack_string_expression]] , [[regularexpressions|regular_expression]] , [[integerexpressions|start_expression]] ) | ||
- | |||
- | returns [[integerexpressions|integer_expression]] | ||
- | |||
- | ==== Description ==== | ||
- | Check to see if the text represented by the regular expression [[regularexpressions|regular_expression]] is contained in the string [[stringexpressions|haystack_string_expression]]. | ||
- | |||
- | You may optionally specify a starting location for the search to begin [[integerexpressions|start_expression]]. | ||
- | |||
- | ==== Note ==== | ||
- | String indices begin at 1. | ||
- | |||
- | ==== Example ==== | ||
- | < | ||
- | print instrx(" | ||
- | print instrx(" | ||
- | </ | ||
- | will display | ||
- | < | ||
- | 4 | ||
- | 12 | ||
- | </ | ||
- | |||
- | ==== Notes ==== | ||
- | |||
- | **instrx** can be used to test if a string matches a regular expression. | ||
- | < | ||
- | function isnumber(s$) | ||
- | # return true if a number - false of not | ||
- | | ||
- | end function | ||
- | </ | ||
- | |||
- | By default the nature of regular expressions is " | ||
- | |||
- | ==== See Also ==== | ||
- | {{page> | ||
- | |||
- | ==== History ==== | ||
- | |0.9.6.56|New To Version| | ||
- | |1.99.99.53|Added start position < 0| | ||