Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
RegExPatterns

Package | spark.components.supportClasses
Class | public final class RegExPatterns
Inheritance | RegExPatterns 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

| Method | Defined By
--- | --- | ---
|  | RegExPatterns() 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

| Constant | Defined 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

CONTAINS | Constant

`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_WITH | Constant |

`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.

EXACT | Constant |

`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.

NOT | Constant |

`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_EMPTY | Constant |

`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_WITH | Constant |

`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 Nov 15 2017, 09:50 AM +01:00