Child pages
  • RegExp

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
{hidden}
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}
\\ 

{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}Specifies if the "g" modifier is set.{td}{tr}{tr:id=ret}{td}*Returns*\\ [Boolean]{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}


HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#global
Specifies if the "g" modifier is set.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#ignoreCase
Specifies if the "i" modifier is set.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#lastIndex
An integer specifying the index at which to start the next match.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#multiline
Specifies if the "m" modifier is set.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#source
The text used for pattern matching.

HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)
#exec(string)
Search a string for a specified value.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#test(string)
Search a string for a specified value.

HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Property Details
Table Body (tbody)
idglobal
classnode
Table Row (tr)
idname
Table Cell (td)
global
Table Row (tr)
iddes
Table Cell (td)
Specifies if the "g" modifier is set.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var str = 'Visit www.servoy.com';	
var patt1 = new RegExp('www');	
application.output(patt1.global);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idignoreCase
classnode
Table Row (tr)
idname
Table Cell (td)
ignoreCase
Table Row (tr)
iddes
Table Cell (td)
Specifies if the "i" modifier is set.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var str = 'Visit www.servoy.com';	
var patt1 = new RegExp('www');	
application.output(patt1.ignoreCase);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idlastIndex
classnode
Table Row (tr)
idname
Table Cell (td)
lastIndex
Table Row (tr)
iddes
Table Cell (td)
An integer specifying the index at which to start the next match.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idmultiline
classnode
Table Row (tr)
idname
Table Cell (td)
multiline
Table Row (tr)
iddes
Table Cell (td)
Specifies if the "m" modifier is set.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var str = 'Visit www.servoy.com';	
var patt1 = new RegExp('www','m');	
application.output(patt1.multiline);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsource
classnode
Table Row (tr)
idname
Table Cell (td)
source
Table Row (tr)
iddes
Table Cell (td)
The text used for pattern matching.
Table Row (tr)
idret
Table Cell (td)
Returns
String
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var str = 'Visit www.servoy.com';	
var patt1 = new RegExp('www.','g');	
application.output('The regular expression is: ' + patt1.source);

...

Table Row (tr)
classlastDetailRow
Table Cell (td)


HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idexec
classnode
Table Row (tr)
idname
Table Cell (td)
exec
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
String
Span
stylefloat: left; font-weight: bold;
idiets
exec
Span
stylefloat: left;
idiets
(string)
Table Row (tr)
iddes
Table Cell (td)
Search a string for a specified value. Returns the found value and remembers the position.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} string
Table Row (tr)
idret
Table Cell (td)
Returns
String – A String representing the found value.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var str='Visit www.servoy.com';
var patt=new RegExp('servoy');
application.output(patt.exec(str));
{code}{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}Search a string for a specified value. Returns true or false.{td}{tr}{tr:id=prs}{td}*Parameters*\\ \{[Object]} string {td}{tr}{tr:id=ret}{td}*Returns*\\ [Boolean] -- true if a match was found in the string. false otherwise.{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idtest
classnode
Table Row (tr)
idname
Table Cell (td)
test
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
test
Span
stylefloat: left;
idiets
(string)
Table Row (tr)
iddes
Table Cell (td)
Search a string for a specified value. Returns true or false.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Object} string
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean – true if a match was found in the string. false otherwise.
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

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}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Table Row (tr)
classlastDetailRow
Table Cell (td)