Phone Number (%PHONE) Macro

The Phone Number macro is used to insert phone numbers into the strings generated by a data source using the Custom String data generator.

The macro is an analog of the Phone Number data generator.

Syntax

The macro is specified using the following regular expression:

%PHONE(NumberFormat)

Parameters

Examples

The following example demonstrates how to use the Phone Number macro:

  • tel:+1-%PHONE(XXX-XXX-XXXX)
    Example: Phone Number macro in Data Generator

    Generates a URI to a phone number in the United States.

  • %PHONE(+X XXX-XXX-XXXX)

    Generates phone numbers that start with +.

  • %PHONE(55X-XXX-XXXX)

    Generates phone numbers that start with 55.

  • %PHONE(xxx-xxx-xxxx)

    The parameter is case-sensitive, so the x symbols will not be transformed to digits. This macro generates the xxx-xxx-xxxx string.

Remarks

For more information on adding macros to custom strings, see About Custom String Generator.

For more information on general rules used for specifying macro parameters, see Custom String Generator Rules.

See Also

Publication date: