Share via


Regular Expression Editor

The Regular Expression Editor enables you to edit the ValidationExpression property of the RegularExpressionValidator control. It offers several predefined formats, such as for telephone numbers and zip codes. You can also edit the format in the text box.

To open the Regular Expression Editor

  1. In Visual Web Developer, create or open an existing .aspx page and switch to Design view.

  2. From the Validation group of the Toolbox, drag a RegularExpressionValidator control onto the page.

  3. Select the control, and in the Properties window, click the ellipsis button (VisualStudioEllipsesButton screenshot) for the ValidationExpression property.

The following table lists the controls that are available in the editor.

UI Elements

  • Standard expressions
    Lists predefined expressions. When you select a name, the corresponding regular expression is defined in the Validation expression box.

  • Validation expression
    Displays the selected regular expression and enables you to edit it or create your own.

    Note

    The dialog box does not check that the expression you create is valid.

See Also

Tasks

How to: Validate Against Patterns for ASP.NET Server Controls

Reference

RegularExpressionValidator Control (General Reference)