{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=39464976-8C55-4B12-95B7-C7E8E97D1CB9}{tr:id=name}{td}h6.global{td}{tr}{tr:id=des}{td}{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_des|text=|trigger=button}{sub-section}{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_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=prs}{td}*Parameters*\\{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_ret|text=|trigger=button}{sub-section}{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_see|text=|trigger=button}{sub-section}{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=link}{td}*External links*\\{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_see|text=|trigger=button}{sub-section}{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/global
{sub-section}{td}{tr}{tr:id=sam}{td}*Sample*\\{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_sam|text=|trigger=button}{sub-section}{sub-section:39464976-8C55-4B12-95B7-C7E8E97D1CB9_sam|class=sIndent|trigger=none}{code:language=javascript}
var str = 'Visit www.servoy.com';
var patt1 = new RegExp('www');
application.output(patt1.global);
{code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=C43EF167-1AD8-4DF7-B29C-BA2489518E06}{tr:id=name}{td}h6.ignoreCase{td}{tr}{tr:id=des}{td}{sub-section:C43EF167-1AD8-4DF7-B29C-BA2489518E06_des|text=|trigger=button}{sub-section}{sub-section:C43EF167-1AD8-4DF7-B29C-BA2489518E06_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=prs}{td}*Parameters*\\{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_ret|text=|trigger=button}{sub-section}{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_see|text=|trigger=button}{sub-section}{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=link}{td}*External links*\\{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_see|text=|trigger=button}{sub-section}{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/lastIndex
{sub-section}{td}{tr}{tr:id=sam}{td}*Sample*\\{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_sam|text=|trigger=button}{sub-section}{sub-section:9CB779AC-19C2-44C3-8FCA-82AE637E928A_sam|class=sIndent|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}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=5639A6C2-E44F-45B3-908B-26778B7C56A0}{tr:id=name}{td}h6.multiline{td}{tr}{tr:id=des}{td}{sub-section:5639A6C2-E44F-45B3-908B-26778B7C56A0_des|text=|trigger=button}{sub-section}{sub-section:5639A6C2-E44F-45B3-908B-26778B7C56A0_des|trigger=none|class=sIndent}ret
Search a string for a specified value. Returns true or false.
{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_prs|trigger=none}string
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_ret|text=|trigger=button}{sub-section}{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_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:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_see|text=|trigger=button}{sub-section}{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=link}{td}*External links*\\{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_see|text=|trigger=button}{sub-section}{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/test
{sub-section}{td}{tr}{tr:id=sam}{td}*Sample*\\{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_sam|text=|trigger=button}{sub-section}{sub-section:BBE815AF-03E1-4CEC-8589-4669ACA0FD85_sam|class=sIndent|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}{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