| 1 |
import { Matcher } from './matcher'; |
| 2 |
import { Match } from '../match/match'; |
| 3 |
/** |
| 4 |
* @class Autolinker.matcher.Phone |
| 5 |
* @extends Autolinker.matcher.Matcher |
| 6 |
* |
| 7 |
* Matcher to find Phone number matches in an input string. |
| 8 |
* |
| 9 |
* See this class's superclass ({@link Autolinker.matcher.Matcher}) for more |
| 10 |
* details. |
| 11 |
*/ |
| 12 |
export declare class PhoneMatcher extends Matcher { |
| 13 |
/** |
| 14 |
* The regular expression to match Phone numbers. Example matches: |
| 15 |
* |
| 16 |
* (123) 456-7890 |
| 17 |
* 123 456 7890 |
| 18 |
* 123-456-7890 |
| 19 |
* +18004441234,,;,10226420346# |
| 20 |
* +1 (800) 444 1234 |
| 21 |
* 10226420346# |
| 22 |
* 1-800-444-1234,1022,64,20346# |
| 23 |
* |
| 24 |
* This regular expression has the following capturing groups: |
| 25 |
* |
| 26 |
* 1 or 2. The prefixed '+' sign, if there is one. |
| 27 |
* |
| 28 |
* @protected |
| 29 |
* @property {RegExp} matcherRegex |
| 30 |
*/ |
| 31 |
protected matcherRegex: RegExp; |
| 32 |
/** |
| 33 |
* @inheritdoc |
| 34 |
*/ |
| 35 |
parseMatches(text: string): Match[]; |
| 36 |
protected testMatch(text: string): boolean; |
| 37 |
} |