{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\
{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Property Summary{th}{tr}{tbody}{tr}{td}[Boolean]{td}{td}[#global]
Specifies if the "g" modifier is set.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#ignoreCase]
Specifies if the "i" modifier is set.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#lastIndex]
An integer specifying the index at which to start the next match.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#multiline]
Specifies if the "m" modifier is set.{td}{tr}{tbody}{tbody}{tr}{td}[String]{td}{td}[#source]
The text used for pattern matching.{td}{tr}{tbody}{table}\\
{table:class=servoy sSummery}{colgroup}{column:width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}[String]{td}{td}[#exec]\(string)
Search a string for a specified value.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#test]\(string)
Search a string for a specified value.{td}{tr}{tbody}{table}\\
{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=882DD9C6-D90C-447C-9F24-D44C23D5D1BF}{tr:id=name}{td}h6.global{td}{tr}{tr:id=des}{td}{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_des|text=|trigger=button}{sub-section}{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_des|trigger=none|class=sIndent}Specifies if the "g" modifier is set.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_ret|text=|trigger=button}{sub-section}{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_see|text=|trigger=button}{sub-section}{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_see|text=|trigger=button}{sub-section}{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_sam|text=|trigger=button}{sub-section}{sub-section:882DD9C6-D90C-447C-9F24-D44C23D5D1BF_sam|class=sIndent|trigger=none}{code:language=javascript}
Div
style
display:none
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=A074B3A6-DD8B-452A-A602-F4DEC3769119}{tr:id=name}{td}h6.ignoreCase{td}{tr}{tr:id=des}{td}{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_des|text=|trigger=button}{sub-section}{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_des|trigger=none|class=sIndent}Specifies if the "i" modifier is set.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_ret|text=|trigger=button}{sub-section}{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_see|text=|trigger=button}{sub-section}{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_see|text=|trigger=button}{sub-section}{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_sam|text=|trigger=button}{sub-section}{sub-section:A074B3A6-DD8B-452A-A602-F4DEC3769119_sam|class=sIndent|trigger=none}{code:language=javascript}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3A943831-1FC2-4634-AF84-F8978631ADB3}{tr:id=name}{td}h6.lastIndex{td}{tr}{tr:id=des}{td}{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_des|text=|trigger=button}{sub-section}{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_des|trigger=none|class=sIndent}An integer specifying the index at which to start the next match.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_ret|text=|trigger=button}{sub-section}{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_see|text=|trigger=button}{sub-section}{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_see|text=|trigger=button}{sub-section}{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_sam|text=|trigger=button}{sub-section}{sub-section:3A943831-1FC2-4634-AF84-F8978631ADB3_sam|class=sIndent|trigger=none}{code:language=javascript}
Table Row (tr)
class
lastDetailRow
Table Cell (td)
Table Body (tbody)
id
lastIndex
Table Row (tr)
id
name
Table Cell (td)
lastIndex
Table Row (tr)
id
des
Table Cell (td)
Div
class
sIndent
An integer specifying the index at which to start the next match.
var str = 'The rain in Spain stays mainly in the plain';
var patt1 = new RegExp('ain', 'g');
patt1.test(str);
application.output('Match found. index now at: ' + patt1.lastIndex);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=DC6084E2-F616-4C61-84A1-349D3EF6AD00}{tr:id=name}{td}h6.multiline{td}{tr}{tr:id=des}{td}{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_des|text=|trigger=button}{sub-section}{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_des|trigger=none|class=sIndent}Specifies if the "m" modifier is set.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_ret|text=|trigger=button}{sub-section}{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_see|text=|trigger=button}{sub-section}{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_see|text=|trigger=button}{sub-section}{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_sam|text=|trigger=button}{sub-section}{sub-section:DC6084E2-F616-4C61-84A1-349D3EF6AD00_sam|class=sIndent|trigger=none}{code:language=javascript}
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=3CDF9E7B-E044-438B-88FB-FF639341CAB0}{tr:id=name}{td}h6.source{td}{tr}{tr:id=des}{td}{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_des|text=|trigger=button}{sub-section}{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_des|trigger=none|class=sIndent}The text used for pattern matching.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_ret|text=|trigger=button}{sub-section}{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_see|text=|trigger=button}{sub-section}{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_see|text=|trigger=button}{sub-section}{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_sam|text=|trigger=button}{sub-section}{sub-section:3CDF9E7B-E044-438B-88FB-FF639341CAB0_sam|class=sIndent|trigger=none}{code:language=javascript}
application.output('The regular expression is: ' + patt1.source);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\
{table:class=servoy sDetail}{colgroup}{column:width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=CE34FA67-AE92-4A26-B96C-7734C4A3C387}{tr:id=name}{td}h6.exec{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[String]{span}{span:id=iets|style=float: left; font-weight: bold;}exec{span}{span:id=iets|style=float: left;}\(string){span}{td}{tr}{tr:id=des}{td}{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_des|text=|trigger=button}{sub-section}{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_des|trigger=none|class=sIndent}Search a string for a specified value. Returns the found value and remembers the position.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_prs|trigger=none}string
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_ret|text=|trigger=button}{sub-section}{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_ret|trigger=none|class=sIndent}[String] -- A String representing the found value.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_see|text=|trigger=button}{sub-section}{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_see|text=|trigger=button}{sub-section}{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_sam|text=|trigger=button}{sub-section}{sub-section:CE34FA67-AE92-4A26-B96C-7734C4A3C387_sam|class=sIndent|trigger=none}{code:language=javascript}
var str='Visit www.servoy.com';
var patt=new RegExp('servoy');
application.output(patt.exec(str));
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=42B36AAA-A7B9-478C-9754-AB60DDFD7C96}{tr:id=name}{td}h6.test{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}test{span}{span:id=iets|style=float: left;}\(string){span}{td}{tr}{tr:id=des}{td}{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_des|text=|trigger=button}{sub-section}{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_des|trigger=none|class=sIndent}Search a string for a specified value. Returns true or false.{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_prs|trigger=none}string
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_ret|text=|trigger=button}{sub-section}{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_ret|trigger=none|class=sIndent}[Boolean] -- true if a match was found in the string. false otherwise.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_see|text=|trigger=button}{sub-section}{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_see|text=|trigger=button}{sub-section}{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_sam|text=|trigger=button}{sub-section}{sub-section:42B36AAA-A7B9-478C-9754-AB60DDFD7C96_sam|class=sIndent|trigger=none}{code:language=javascript}