User Tools

Site Tools


en:midx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:midx [2016/01/01 22:41]
127.0.0.1 external edit
en:midx [2020/02/28 10:46]
Line 1: Line 1:
-===== MidX (Function) ===== 
-==== Format ==== 
-**midx** ( //haystack_expr// , //regex_expr// )\\ 
-**midx** ( //haystack_expr// , //regex_expr// , //start_expr// ) 
- 
-returns //string_expr// 
- 
-==== Description ==== 
-Returns the first substring that was matched by the regular expression.  If the expression does not match anything the emoty string "" will be returned. You may also specify an optional starting location for the search to begin //start_expr//. 
-==== Note ==== 
-String indices begin at 1. 
-==== Example ==== 
-<code> 
-print midx("HeLLo", "[Ll]o") 
-print midx("Hello, Kitti","[Ii]",10) 
-</code> 
-will display 
-<code> 
-Lo 
-i 
-</code> 
- 
-==== Notes ==== 
-By default the nature of regular expressions is "greedy". This behaviour can be changed using the [[regexminimal|RegexMinimal]] statement. 
- 
- 
-==== See Also ==== 
-{{page>en:start#String Handling&noheader}} 
- 
-==== History ====  
-|1.1.2.7|New To Version| 
  
en/midx.txt · Last modified: 2020/02/28 10:46 (external edit)