Packagecom.esri.bacore.domain
Classpublic class SearchPattern
InheritanceSearchPattern Inheritance Object

Since : Business Analyst API for Flex 3.0.

The SearchPattern class implements a pattern to be searched in a string.

The pattern could be a regular expression or a string value. A string pattern could contain one wildcard symbol '*'. If the string pattern doesn't contain a wildcard, it is searched as a substring. With a wildcard, the starting characters of a tested string are compared with the content before the wildcard and the ending characters are compared with the content after the wildcard. For example, "M10*_X" string pattern means that the tested string should have at least 5 characters, start from "M10", and end with "_X".



Public Properties
 PropertyDefined By
  preventConversionOfInput : Boolean
[read-only] Returns true if this pattern forbids conversion of an input string value to lower case.
SearchPattern
Public Methods
 MethodDefined By
  
SearchPattern(pattern:Object, allowWildcard:Boolean = true)
Creates a new instance of the SearchPattern class.
SearchPattern
  
matches(value:String):Boolean
Tests an input string value to match this pattern.
SearchPattern
Property Detail
preventConversionOfInputproperty
preventConversionOfInput:Boolean  [read-only]

Returns true if this pattern forbids conversion of an input string value to lower case.

This property value is tested in a string filter when case insensitive conversion is applied. In fact the true value indicates that the search pattern is a regular expression applying its own algorithm of case insensitive conversion.


Implementation
    public function get preventConversionOfInput():Boolean
Constructor Detail
SearchPattern()Constructor
public function SearchPattern(pattern:Object, allowWildcard:Boolean = true)

Creates a new instance of the SearchPattern class. The allowWildcard parameter affects on string patterns only.

Parameters
pattern:Object — The search pattern. It is either RegExp or a string value.
 
allowWildcard:Boolean (default = true) — Allow wildcard in a string pattern or not.
Method Detail
matches()method
public function matches(value:String):Boolean

Tests an input string value to match this pattern.

Parameters

value:String — The input value.

Returns
Boolean — True if the input string matches this pattern.