(Created page with "<seo title="Pattern Matching Newline | vEdit" description="Use Pattern Matching codes to match the “newline” character(s) Carriage-Return and/or Line-Feed depending upon...")
 
Line 6: Line 6:
 
When <kbd>CONFIG</kbd> > <kbd>File handling</kbd> > <kbd>File type</kbd> is set to “0” (Windows/DOS text file), they match a Carriage-Return and Line-Feed as the “newline” characters. When set to “2” (Mac text file) they match a single Carriage- Return character. Otherwise, they match a single “Line-Feed” character.
 
When <kbd>CONFIG</kbd> > <kbd>File handling</kbd> > <kbd>File type</kbd> is set to “0” (Windows/DOS text file), they match a Carriage-Return and Line-Feed as the “newline” characters. When set to “2” (Mac text file) they match a single Carriage- Return character. Otherwise, they match a single “Line-Feed” character.
  
'''|L'''”and “'''|N'''are similar, but not identical. For file type “0” (Windows/DOS text), “|L” treats a Carriage-Return as optional, while |N” requires both a Carriage-Return and Line-Feed. Therefore, |L” is preferred in search strings because it handles Windows/DOS text files that might be missing some Carriage-Returns. For other file types, |L” and |N” are identical.
+
'''|L''' and '''|N''' are similar, but not identical. For file type “0” (Windows/DOS text), “|L” treats a Carriage-Return as optional, while '''|N''' requires both a Carriage-Return and Line-Feed. Therefore, '''|L''' is preferred in search strings because it handles Windows/DOS text files that might be missing some Carriage-Returns. For other file types, '''|L''' and '''|N''' are identical.
 +
 
 +
'''|N''' is equivalent to '''|013|010''', '''|010''' or '''|013''', depending upon the file type. '''|N''' works slightly faster than '''|L''' and '''|N''' can be used in the replacement string. Using '''|N''' is a convenient way to enter a multiple-line replacement string. In summary:
 +
 
 +
*'''|L''' is preferred in search strings.
 +
*'''|N''' can be used in replacement strings
 +
 
 +
==Related Resources==

Revision as of 19:24, 6 February 2017


The pattern matching codes “|L” and “|N” match the “newline” character(s) Carriage-Return and/or Line-Feed depending upon the current file type. More info on Pattern Matching Codes

When CONFIG > File handling > File type is set to “0” (Windows/DOS text file), they match a Carriage-Return and Line-Feed as the “newline” characters. When set to “2” (Mac text file) they match a single Carriage- Return character. Otherwise, they match a single “Line-Feed” character.

|L and |N are similar, but not identical. For file type “0” (Windows/DOS text), “|L” treats a Carriage-Return as optional, while |N requires both a Carriage-Return and Line-Feed. Therefore, |L is preferred in search strings because it handles Windows/DOS text files that might be missing some Carriage-Returns. For other file types, |L and |N are identical.

|N is equivalent to |013|010, |010 or |013, depending upon the file type. |N works slightly faster than |L and |N can be used in the replacement string. Using |N is a convenient way to enter a multiple-line replacement string. In summary:

  • |L is preferred in search strings.
  • |N can be used in replacement strings

Related Resources