Child pages
  • RegExp

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{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=59675EE7-64E1-4595-ABD0-C7D6BA4A02FB}{tr:id=name}{td}h6.global{td}{tr}{tr:id=des}{td}{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_des|text=|trigger=button}{sub-section}{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_des|trigger=none|class=sIndent}
Wiki Markup
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy 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:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_ret|text=|trigger=button}{sub-section}{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_see|text=|trigger=button}{sub-section}{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_see|text=|trigger=button}{sub-section}{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_sam|text=|trigger=button}{sub-section}{sub-section:59675EE7-64E1-4595-ABD0-C7D6BA4A02FB_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=734CA76C-BD42-4516-A0A9-A157B5ADBAC3}{tr:id=name}{td}h6.ignoreCase{td}{tr}{tr:id=des}{td}{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_des|text=|trigger=button}{sub-section}{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_des|trigger=none|class=sIndent}
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowignoreCasename

ignoreCase

dessIndent
Specifies if the "i" modifier is set.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_ret|text=|trigger=button}{sub-section}{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_see|text=|trigger=button}{sub-section}{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_see|text=|trigger=button}{sub-section}{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_sam|text=|trigger=button}{sub-section}{sub-section:734CA76C-BD42-4516-A0A9-A157B5ADBAC3_sam|class=sIndent|trigger=none}{code:language=javascript} var str = 'Visit www.servoy.com'; var patt1 = new RegExp('www'); application.output(patt1.ignoreCase); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=08C42FAA-E864-4AD6-ABC8-13BDDB717EAA}{tr:id=name}{td}h6.lastIndex{td}{tr}{tr:id=des}{td}{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_des|text=|trigger=button}{sub-section}{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_des|trigger=none|class=sIndent}
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowlastIndexname

lastIndex

dessIndent
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:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_ret|text=|trigger=button}{sub-section}{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_see|text=|trigger=button}{sub-section}{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_see|text=|trigger=button}{sub-section}{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_sam|text=|trigger=button}{sub-section}{sub-section:08C42FAA-E864-4AD6-ABC8-13BDDB717EAA_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=726E217B-B14F-4C10-AE69-09487BD92F81}{tr:id=name}{td}h6.multiline{td}{tr}{tr:id=des}{td}{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_des|text=|trigger=button}{sub-section}{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_des|trigger=none|class=sIndent}
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowmultilinename

multiline

dessIndent
Specifies if the "m" modifier is set.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_ret|text=|trigger=button}{sub-section}{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_see|text=|trigger=button}{sub-section}{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_see|text=|trigger=button}{sub-section}{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_sam|text=|trigger=button}{sub-section}{sub-section:726E217B-B14F-4C10-AE69-09487BD92F81_sam|class=sIndent|trigger=none}{code:language=javascript} var str = 'Visit www.servoy.com'; var patt1 = new RegExp('www','m'); application.output(patt1.multiline); {code}{sub-section}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=819AFC3C-0094-47F9-879E-179EE3743628}{tr:id=name}{td}h6.source{td}{tr}{tr:id=des}{td}{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_des|text=|trigger=button}{sub-section}{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_des|trigger=none|class=sIndent}
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowsourcename

source

dessIndent
The text used for pattern matching.
{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_ret|text=|trigger=button}{sub-section}{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_see|text=|trigger=button}{sub-section}{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_see|text=|trigger=button}{sub-section}{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_sam|text=|trigger=button}{sub-section}{sub-section:819AFC3C-0094-47F9-879E-179EE3743628_sam|class=sIndent|trigger=none}{code:language=javascript} var str = 'Visit www.servoy.com'; var patt1 = new RegExp('www.','g'); 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=71300463-3292-46F7-85E8-F669A725BC3B}{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:71300463-3292-46F7-85E8-F669A725BC3B_des|text=|trigger=button}{sub-section}{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_des|trigger=none|class=sIndent}
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow

functionservoy sDetail2100%height:30px2Methods Detailsexecname

exec(string)

dessIndent
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:71300463-3292-46F7-85E8-F669A725BC3B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_prs|trigger=none}string {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_ret|text=|trigger=button}{sub-section}{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_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:71300463-3292-46F7-85E8-F669A725BC3B_see|text=|trigger=button}{sub-section}{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_see|text=|trigger=button}{sub-section}{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_sam|text=|trigger=button}{sub-section}{sub-section:71300463-3292-46F7-85E8-F669A725BC3B_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=513E5BD7-EBAB-4873-B9CB-AD59B71B614B}{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:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_des|text=|trigger=button}{sub-section}{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_des|trigger=none|class=sIndent}
prs

Parameters

sIndentstring ;
ret

Returns

sIndent A String representing the found value.
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowtestname

test(string)

dessIndent
Search a string for a specified value. Returns true or false.
{sub-section}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_prs|trigger=none}string {sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_ret|text=|trigger=button}{sub-section}{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_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:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_see|text=|trigger=button}{sub-section}{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_see|text=|trigger=button}{sub-section}{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_link|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_sam|text=|trigger=button}{sub-section}{sub-section:513E5BD7-EBAB-4873-B9CB-AD59B71B614B_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

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow