Pattern: Line break

“Line break” is one of the patterns that you can select on the Match panel. Use this pattern to match one line break from a set of allowed ASCII and/or Unicode line break styles, or to match a character that is not (part of) one of the selected line break styles.

CRLF Pair

Allow the line break to be a carriage return and line feed pair. This is the standard line break style for Windows text files. If the target application supports atomic grouping or has a special token for matching CRLF pairs then the generated regex will not match the CR in a CRLF pair if you include the CRLF line break style, even if you also allow a single CR as a line break.

If you do not select any of the line break styles then the pattern matches those line breaks that the application’s regex engine does notmatch with the dot when the dot is set to not match line breaks. It will match a CRLF pair as a single line break if the application's regex engine does not allow anchors to match in the middle of a CRLF pair.

Line Feed

Allow the line break to be a single line feed character. This is character 10 in the ASCII table and represented by \n in C strings. This is the standard line break style for text files on UNIX, Linux, and modern Macs.

Carriage Return

Allow the line break to be a single carriage return character. This is character 13 in the ASCII table and represented by \r in C strings. This was the standard line break style for text files on the original Macintosh system. (OS X changed it to a single line feed). If the target application supports atomic grouping or has a special token for matching CRLF pairs then the generated regex will not match the CR in a CRLF pair if you also include the CRLF line break style. If you include CR but not the CRLF line break style then the generated regex can match the CR in a CRLF pair.

Form Feed

Allow the line break to be a form feed character. This is character 12 in the ASCII table and represented by \f in C strings. It represents a page break which Unicode also treats as a line break.

Vertical Tab

Allow the line break to be a vertical tab character. This is character 11 in the ASCII table and represented by \v in C strings.

Next Line

Allow the line break to be a next line character. This is character 0x85 in the ISO-8859 code pages and code point U+0085 in Unicode.

Line Separator

Allow the line break to be a Unicode line separator. This is code point U+2028 in Unicode. It is the only character in Unicode’s Zl or Line_Separator category.

Page Separator

Allow the line break to be a Unicode page separator. This is code point U+2029 in Unicode. It is the only character in Unicode’s Zp or Page_Separator category.

Any Character Except Line Breaks

Make the pattern match any single character that is not one of the selected line break styles. If you do not select any of the line break styles then the pattern matches any single character that the application’s regex engine can always match with the dot.

Since the negated pattern only looks at individual characters, matching any single character except a CRLF pair will match any character except a CR or an LF. Thus line breaks that consist of a single CR or a single LF will not be matched either if you select to not match CRLF pairs.

Examples