Child pages
  • RegExp

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{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=39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3}{tr:id=name}{td}h6.global{td}{tr}{tr:id=des}{td}{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_des|text=|trigger=button}{sub-section}{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_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:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_ret|text=|trigger=button}{sub-section}{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_see|text=|trigger=button}{sub-section}{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_see|text=|trigger=button}{sub-section}{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_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={sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_sam|text=|trigger=button}{sub-section}{sub-section:39464976359C4F67-8C554317-4B124F20-95B7B9BE-C7E8E97D1CB99066F60B62C3_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=C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF}{tr:id=name}{td}h6.ignoreCase{td}{tr}{tr:id=des}{td}{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_des|text=|trigger=button}{sub-section}{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_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:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_ret|text=|trigger=button}{sub-section}{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_see|text=|trigger=button}{sub-section}{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_see|text=|trigger=button}{sub-section}{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/ignoreCase
{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_sam|text=|trigger=button}{sub-section}{sub-section:C43EF167238877B0-1AD84F17-4DF74677-B29CA753-BA2489518E067A58F2445EDF_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=9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4}{tr:id=name}{td}h6.lastIndex{td}{tr}{tr:id=des}{td}{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_des|text=|trigger=button}{sub-section}{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_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:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_ret|text=|trigger=button}{sub-section}{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_see|text=|trigger=button}{sub-section}{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_see|text=|trigger=button}{sub-section}{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/lastIndex
{sub-section}{td}{tr}{tr:{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_sam|text=|trigger=button}{sub-section}{sub-section:9CB779AC72D08547-19C2DBB0-44C34F4E-8FCAAF13-82AE637E928A5BDB32E17CD4_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=5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C}{tr:id=name}{td}h6.multiline{td}{tr}{tr:id=des}{td}{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_des|text=|trigger=button}{sub-section}{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_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:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_ret|text=|trigger=button}{sub-section}{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_see|text=|trigger=button}{sub-section}{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_see|text=|trigger=button}{sub-section}{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/multiline
{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_sam|text=|trigger=button}{sub-section}{sub-section:5639A6C215961064-E44F734A-45B3497A-908B9A87-26778B7C56A0392172783E5C_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=D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA}{tr:id=name}{td}h6.source{td}{tr}{tr:id=des}{td}{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_des|text=|trigger=button}{sub-section}{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_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:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_prs|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_ret|text=|trigger=button}{sub-section}{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_ret|trigger=none|class=sIndent}[String]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_see|text=|trigger=button}{sub-section}{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_see|text=|trigger=button}{sub-section}{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/source
{sub-section}{td}{tr}{tr:id{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_sam|text=|trigger=button}{sub-section}{sub-section:D589BDA43C3BDC6C-47CE8F6F-49254220-B2B59D0B-074A0F5F963CF7E6021E60BA_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=8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B}{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:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_des|text=|trigger=button}{sub-section}{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_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:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_prs|trigger=none}string
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_ret|text=|trigger=button}{sub-section}{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_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:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_see|text=|trigger=button}{sub-section}{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_see|text=|trigger=button}{sub-section}{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/exec
{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_sam|text=|trigger=button}{sub-section}{sub-section:8D8B3299B9B07640-35FE3622-408349BB-9ACAA953-8A8A7347245A5D41354FA82B_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=BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E}{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:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_des|text=|trigger=button}{sub-section}{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_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:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_prs|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_prs|trigger=none}string
{sub-section}{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_ret|text=|trigger=button}{sub-section}{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_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:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_see|text=|trigger=button}{sub-section}{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_see|class=sIndent|trigger=none}{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_see|text=|trigger=button}{sub-section}{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_link|class=sIndent|trigger=none}https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp/test
{sub-section}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_sam|text=|trigger=button}{sub-section}{sub-section:BBE815AFE3466286-03E12A4D-4CEC4466-8589BFF1-4669ACA0FD85A6F6BD437B9E_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}