patternToRegExp
(pattern,ignoreCase)
Defined by dojo/data/util/filter
Helper function to convert a simple pattern to a regular expression for matching.
Returns a regular expression object that conforms to the defined conversion rules. For example:
and so on.
Parameter | Type | Description |
---|---|---|
pattern | string |
A simple matching pattern to convert that follows basic rules:
To use a \ as a character in the string, it must be escaped. So in the pattern it should be represented by \ to be treated as an ordinary \ character instead of an escape. |
ignoreCase | boolean | Optional
An optional flag to indicate if the pattern matching should be treated as case-sensitive or not when comparing By default, it is assumed case sensitive. |
Returns: instance
© 2005–2017 JS Foundation
Licensed under the AFL 2.1 and BSD 3-Clause licenses.
http://dojotoolkit.org/api/1.10/dojo/data/util/filter.html