Pattern: List of literal text

“List of literal text” is one of the patterns that you can select on the Match panel. Use this pattern to make a field match a piece of text from a list that you provide. If you repeat the field, a different item from the list may be matched with each repetition.

Case Insensitive

Turn on to make the field ignore the differences in uppercase and lowercase letters between the list of literal text below and the actual values the regex will match.

Delimit List with Page Breaks

Turn on to use page breaks to delimit the items in the list of literal text below. This will allow you to specify values that span across multiple lines. Press Ctrl+Enter to insert a page break. A horizontal line will represent the page break. The Backspace and Delete keys will delete page breaks just like line breaks and other characters.

Turn off to use line breaks to delimit the list of literal text. This way you cannot specify text that spans across multiple lines, but you can easily paste in a list of text. Press Enter to insert a line break.

Whether you use line breaks or page breaks only affects the way you will specify the list in RegexMagic. It does not affect the final regular expression given the same list of literal text appropriately delimited with line breaks or page breaks. The automatic pattern detection only uses page breaks when it detects multi-line values.

Match any text except the specified text

Turn on to make the field match any text except the text that you have specified. The minimum and maximum number of times you set to repeat this field then specifies the minimum and maximum number of characters this field can match.

Turn off to make the field match the text that you have specified. If you set the field to repeat more than once, the field will try to match the entire block of text as many times as you specified.

Can Span Across Lines

Turn on to allow this field to match more than one line of text. Turn off to require this field's match to stay within one line.

This option is only used when "match any text except the specified text" is turned on.

List of Literal Text

Enter the text this field should allow. Press Enter to insert a line break to delimit each piece of text. Press Ctrl+Enter to insert a page break when delimiting the list of values with page breaks.

This control is a full-featured text editor. You can cut, copy and paste with Ctrl+X, Ctrl+C and Ctrl+V as usual.

In the "none" field validation mode, the field will allow any combination of any of the characters present in the list of literal text. The shortest and longest pieces of text determine the minimum and maximum length of the field.

In the "loose", "average", and "strict" field validation modes, the field will use each piece of literal text exactly as you specified it.

Examples