Packagespark.components.supportClasses
Classpublic final class RegExPatterns
InheritanceRegExPatterns Inheritance Object

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

This provides a means to standardize certain common regex patterns and functionality.

Use the constants in ActionsScript, as the following example shows:

       createRegExp("my search value", RegExPatterns.CONTAINS):RegExp
     



Public Methods
 MethodDefined By
  
Constructor.
RegExPatterns
  
createPatternString(patternValue:String, patternType:String):String
[static] Creates a new string based RegEx pattern based on a given value and a selected pattern Type.
RegExPatterns
  
createRegExp(patternValue:String, patternType:String):RegExp
[static] Creates a new RegEx pattern based on a given value and a selected pattern Type.
RegExPatterns
Public Constants
 ConstantDefined By
  CONTAINS : String = contains
[static] Specifies the use of a regex pattern matching the end with a given value.
RegExPatterns
  ENDS_WITH : String = endsWith
[static] Specifies the use of a regex pattern matching the end with a given value.
RegExPatterns
  EXACT : String = exact
[static] Specifies the use of a regex pattern matching exacly to a given value.
RegExPatterns
  NOT : String = not
[static] Specifies the use of a regex pattern match that does not contain a given value.
RegExPatterns
  NOT_EMPTY : String = notEmpty
[static] Specifies the use of a regex pattern match that specifies must have at least 1 character matching.
RegExPatterns
  STARTS_WITH : String = startsWith
[static] Specifies the use of a regex pattern matching the beginging with a given value.
RegExPatterns
Constructor Detail
RegExPatterns()Constructor
public function RegExPatterns()

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Constructor.

Method Detail
createPatternString()method
public static function createPatternString(patternValue:String, patternType:String):String

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Creates a new string based RegEx pattern based on a given value and a selected pattern Type.

Parameters

patternValue:String — Is the value that will be assembled into the RegEx type.
 
patternType:String (default = NaN) — Is the type of regen pattern matching to be performed.

Returns
String — Returns a string with a formatted RegEx pattern.
createRegExp()method 
public static function createRegExp(patternValue:String, patternType:String):RegExp

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Creates a new RegEx pattern based on a given value and a selected pattern Type.

Parameters

patternValue:String — Is the value that will be assembled into the RegEx type.
 
patternType:String (default = NaN) — Is the type of regen pattern matching to be performed.

Returns
RegExp — Returns a RegExp with a formatted RegEx pattern.
Constant Detail
CONTAINSConstant
public static const CONTAINS:String = contains

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Specifies the use of a regex pattern matching the end with a given value.

ENDS_WITHConstant 
public static const ENDS_WITH:String = endsWith

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Specifies the use of a regex pattern matching the end with a given value.

EXACTConstant 
public static const EXACT:String = exact

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Specifies the use of a regex pattern matching exacly to a given value.

NOTConstant 
public static const NOT:String = not

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Specifies the use of a regex pattern match that does not contain a given value.

NOT_EMPTYConstant 
public static const NOT_EMPTY:String = notEmpty

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Specifies the use of a regex pattern match that specifies must have at least 1 character matching.

STARTS_WITHConstant 
public static const STARTS_WITH:String = startsWith

Language Version : ActionScript 3.0
Product Version : Flex 4.10
Runtime Versions : Flash Player 11.1, AIR 3.4

Specifies the use of a regex pattern matching the beginging with a given value.