{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:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{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:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{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:id=property|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Property Details{th}{tr}{tbody:id=global|class=node}{tr:id=name}{td}h6.global{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:global_des|trigger=button|text=}{sub-section}{sub-section:global_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:global_snc|trigger=button|text=}{sub-section}{sub-section:global_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:global_prs|trigger=button|text=}{sub-section}{sub-section:global_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:global_ret|trigger=button|text=}{sub-section}{sub-section:global_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:global_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:global_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:global_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:global_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:global_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:global_sam|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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=ignoreCase|class=node}{tr:id=name}{td}h6.ignoreCase{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:ignoreCase_des|trigger=button|text=}{sub-section}{sub-section:ignoreCase_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:ignoreCase_snc|trigger=button|text=}{sub-section}{sub-section:ignoreCase_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:ignoreCase_prs|trigger=button|text=}{sub-section}{sub-section:ignoreCase_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:ignoreCase_ret|trigger=button|text=}{sub-section}{sub-section:ignoreCase_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:ignoreCase_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ignoreCase_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:ignoreCase_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ignoreCase_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:ignoreCase_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:ignoreCase_sam|trigger=none}{code:language=javascript}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=lastIndex|class=node}{tr:id=name}{td}h6.lastIndex{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:lastIndex_des|trigger=button|text=}{sub-section}{sub-section:lastIndex_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:lastIndex_snc|trigger=button|text=}{sub-section}{sub-section:lastIndex_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:lastIndex_prs|trigger=button|text=}{sub-section}{sub-section:lastIndex_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:lastIndex_ret|trigger=button|text=}{sub-section}{sub-section:lastIndex_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:lastIndex_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:lastIndex_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:lastIndex_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:lastIndex_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:lastIndex_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:lastIndex_sam|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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=multiline|class=node}{tr:id=name}{td}h6.multiline{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:multiline_des|trigger=button|text=}{sub-section}{sub-section:multiline_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:multiline_snc|trigger=button|text=}{sub-section}{sub-section:multiline_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:multiline_prs|trigger=button|text=}{sub-section}{sub-section:multiline_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:multiline_ret|trigger=button|text=}{sub-section}{sub-section:multiline_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:multiline_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:multiline_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:multiline_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:multiline_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:multiline_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:multiline_sam|trigger=none}{code:language=javascript}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=source|class=node}{tr:id=name}{td}h6.source{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:source_des|trigger=button|text=}{sub-section}{sub-section:source_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:source_snc|trigger=button|text=}{sub-section}{sub-section:source_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:source_prs|trigger=button|text=}{sub-section}{sub-section:source_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:source_ret|trigger=button|text=}{sub-section}{sub-section:source_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:source_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:source_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:source_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:source_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:source_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:source_sam|trigger=none}{code:language=javascript}
application.output('The regular expression is: ' + patt1.source);
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}\\
{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=exec-Object|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:exec-Object_des|trigger=button|text=}{sub-section}{sub-section:exec-Object_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:exec-Object_snc|trigger=button|text=}{sub-section}{sub-section:exec-Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:exec-Object_prs|trigger=button|text=}{sub-section}{sub-section:exec-Object_prs|trigger=none|class=sIndent}\{[Object]} string
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:exec-Object_ret|trigger=button|text=}{sub-section}{sub-section:exec-Object_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:exec-Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:exec-Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:exec-Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:exec-Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:exec-Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:exec-Object_sam|trigger=none}{code:language=javascript}
var str='Visit www.servoy.com';
var patt=new RegExp('servoy');
application.output(patt.exec(str));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=test-Object|class=node}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:test-Object_des|trigger=button|text=}{sub-section}{sub-section:test-Object_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:test-Object_snc|trigger=button|text=}{sub-section}{sub-section:test-Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:test-Object_prs|trigger=button|text=}{sub-section}{sub-section:test-Object_prs|trigger=none|class=sIndent}\{[Object]} string
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:test-Object_ret|trigger=button|text=}{sub-section}{sub-section:test-Object_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:test-Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:test-Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:test-Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:test-Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:test-Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:test-Object_sam|trigger=none}{code:language=javascript}