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 function RegExPatterns()
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4.10 |
Runtime Versions : | Flash Player 11.1, AIR 3.4 |
Constructor.
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.
|
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.
|
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.
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.
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.
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.
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.
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.
Wed Mar 25 2015, 07:57 PM +01:00