{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:padding=0px|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:id=|class=servoy sSummary}{colgroup}{column:padding=0px|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:id=property|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{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}{tr:id=des}{td}{sub-section:global_des|text=|trigger=button}{sub-section}{sub-section:global_des|trigger=none|class=sIndent}
Cache
index
true
refresh
100d
showRefresh
true
id
doc
title
Refresh page
showDate
true
retry
Enable
servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClientservoy sSummary12%30%58%height: 30px;3Property SummarySpecifies if the "g" modifier is set.Specifies if the "i" modifier is set.An integer specifying the index at which to start the next match.Specifies if the "m" modifier is set.The text used for pattern matching.servoy sSummary12%30%58%height: 30px;3Methods SummarySearch a string for a specified value.Search a string for a specified value.propertyservoy sDetail2100%height:30px2Property Detailsglobalname
global
dessIndent
Specifies if the "g" modifier is set.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:global_snc|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:global_sam|trigger=none}{code:language=javascript}
var str = 'Visit www.servoy.com';
var patt1 = new RegExp('www');
application.output(patt1.global);
{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}{tr:id=des}{td}{sub-section:ignoreCase_des|text=|trigger=button}{sub-section}{sub-section:ignoreCase_des|trigger=none|class=sIndent}ret
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:ignoreCase_snc|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:ignoreCase_sam|trigger=none}{code:language=javascript}
var str = 'Visit www.servoy.com';
var patt1 = new RegExp('www');
application.output(patt1.ignoreCase);
{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}{tr:id=des}{td}{sub-section:lastIndex_des|text=|trigger=button}{sub-section}{sub-section:lastIndex_des|trigger=none|class=sIndent}ret
An integer specifying the index at which to start the next match.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:lastIndex_snc|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:lastIndex_sam|trigger=none}{code:language=javascript}
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}{tr:id=des}{td}{sub-section:multiline_des|text=|trigger=button}{sub-section}{sub-section:multiline_des|trigger=none|class=sIndent}ret
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:multiline_snc|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{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|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:multiline_sam|trigger=none}{code:language=javascript}
var str = 'Visit www.servoy.com';
var patt1 = new RegExp('www','m');
application.output(patt1.multiline);
{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}{tr:id=des}{td}{sub-section:source_des|text=|trigger=button}{sub-section}{sub-section:source_des|trigger=none|class=sIndent}ret
Search a string for a specified value. Returns the found value and remembers the position.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:exec_snc|text=|trigger=button}{sub-section}{sub-section:exec_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:exec_prs|text=|trigger=button}{sub-section}{sub-section:exec_prs|trigger=none|class=sIndent}\{[Object]} string
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:exec_ret|text=|trigger=button}{sub-section}{sub-section:exec_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_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:exec_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:exec_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:exec_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:exec_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:exec_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|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}{tr:id=des}{td}{sub-section:test_des|text=|trigger=button}{sub-section}{sub-section:test_des|trigger=none|class=sIndent}prs
Parameters
sIndentstring ;ret
Returns
sIndent A String representing the found value.clients
Search a string for a specified value. Returns true or false.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:test_snc|text=|trigger=button}{sub-section}{sub-section:test_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:test_prs|text=|trigger=button}{sub-section}{sub-section:test_prs|trigger=none|class=sIndent}\{[Object]} string
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:test_ret|text=|trigger=button}{sub-section}{sub-section:test_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_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:test_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:test_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:test_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:test_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:test_sam|trigger=none}{code:language=javascript}
var str='Visit www.servoy.com';
var patt=new RegExp('soft');
application.output(patt.test(str)==true);
patt.compile('servoy');
application.output(patt.test(str)==true)
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}prs
Parameters
sIndentstring ;ret
Returns
sIndent true if a match was found in the string. false otherwise.clients