Difference between revisions of "Extensions.StringUtil.MatchToRegularExpression"

From emotive
Jump to navigation Jump to search
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:'''MatchToRegularExpression '''}}[[Category:StringUtil]]
 
{{DISPLAYTITLE:'''MatchToRegularExpression '''}}[[Category:StringUtil]]
 
== Classification ==
 
== Classification ==
{{ClassificationActivity | MatchToRegularExpression | Uses of regular expressions | [[Term]] | [[Extensions.StringUtil|OTX StringUtil extension]] | [[StringUtil related terms]] | [[OutOfBoundsException]] | - }}
+
{{ClassificationActivity | MatchToRegularExpression | Uses of regular expressions | [[Term]] | [[Extensions.StringUtil|OTX StringUtil extension]] | [[Extensions.StringUtil#Terms|StringUtil related terms]] | [[Core.DataTypes.ComplexDataType.OutOfBoundsException|OutOfBoundsException]] | - }}
  
 
== OTL Syntax ==
 
== OTL Syntax ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
BooleanTerm = MatchToRegularExpression(StringTerm, StringTerm);
+
BooleanTerm StringUtil.MatchToRegularExpression(StringTerm string, StringTerm regExp);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
== Description ==
 
== Description ==
The '''MatchToRegularExpression''' term returns TRUE if the used regular expression also returns TRUE on the string .
+
The '''MatchToRegularExpression''' term will return TRUE, if and only if the regular expression performed on the input string is true.
  
 
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Result of the regular expression that is applied to the string}}
 
{{TermReturnValue| [[Core.DataTypes.SimpleDataType.Boolean|Boolean]] | Result of the regular expression that is applied to the string}}
Line 16: Line 16:
 
{| {{TableHeader}}
 
{| {{TableHeader}}
 
{{TableRowPropertiesHeader}}
 
{{TableRowPropertiesHeader}}
{{TableRowPropertie1| String | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The string is analysed}}
+
{{TableRowPropertie1| String | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | Represents the '''String''' which will be analysed.}}
{{TableRowPropertie2| RegExp | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | The regular expression specified string will be carried out on the}}
+
{{TableRowPropertie2| RegExp | [[Core.DataTypes.SimpleDataType.String|String]] | [[Term]] | - | [1] | This '''String''' value represents the regular expression, which will be performed on the other String given by the <'''string'''> argument.}}
 
|}
 
|}
  
 
== OTL Examples ==
 
== OTL Examples ==
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
 
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;">
Boolean Boolean1 = false;
+
/// Local Declarations
  
Boolean1 = MatchToRegularExpression("emotive", "[a-z]*");
+
Boolean Boolean1;
 +
 
 +
/// Flow
 +
 
 +
Boolean1 = StringUtil.MatchToRegularExpression("emotive", "[a-z]*");
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Latest revision as of 03:16, 13 September 2019

Classification

Name MatchToRegularExpression
Short Description Uses of regular expressions
Class Term
Extension OTX StringUtil extension
Group StringUtil related terms
Exceptions OutOfBoundsException
Checker Rules -
Standard Compliant Yes

OTL Syntax

BooleanTerm StringUtil.MatchToRegularExpression(StringTerm string, StringTerm regExp);

Description

The MatchToRegularExpression term will return TRUE, if and only if the regular expression performed on the input string is true.

Return Value

The Term returns the value, see table below.

Icons Note.png In OTX, Terms are categorized according to its return data type!
Data Type Description
Boolean Result of the regular expression that is applied to the string

Properties

Name Data Type Class Default Cardinality Description
String String Term - [1] Represents the String which will be analysed.
RegExp String Term - [1] This String value represents the regular expression, which will be performed on the other String given by the <string> argument.

OTL Examples

/// Local Declarations

Boolean Boolean1;

/// Flow

Boolean1 = StringUtil.MatchToRegularExpression("emotive", "[a-z]*");

See also

ReplaceSubString
StringConcatenate
SubString
LengthOfString
IndexOf
SplitString
ToUpper
ToLower
Encode
Decode