(→Related Resources) |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
{{DISPLAYTITLE:Matching the Beginning / End of a Line}} | {{DISPLAYTITLE:Matching the Beginning / End of a Line}} | ||
| − | The code '''|<''' occurring at the beginning of a search string ensures that the entire search string only matches text occurring at the beginning of a line. | + | The code '''|<''' occurring at the beginning of a search string ensures that the entire search string only matches text occurring at the beginning of a line. [[Pattern_Matching#Pattern_Matching_Codes|More info on Pattern Matching Codes]] |
Similarly, the code '''|>''' occurring at the end of a search string ensures that the entire search string only matches text occurring at the end of a line. | Similarly, the code '''|>''' occurring at the end of a search string ensures that the entire search string only matches text occurring at the end of a line. | ||
| Line 9: | Line 9: | ||
==Related Resources== | ==Related Resources== | ||
| + | *[[Pattern_Matching|Pattern Matching Overview]] | ||
| + | *[[Pattern_Matching_Newline|Pattern Matching the Newline]] | ||
| + | *[[Pattern_Matching_Multiple_Characters|Pattern Matching Multiple Characters]] | ||
| + | *[[Pattern_Matching_Sets|Pattern Matching Sets]] | ||
| + | *[[Registers_Search_Strings|Use Text Registers in Search Strings]] | ||
The code |< occurring at the beginning of a search string ensures that the entire search string only matches text occurring at the beginning of a line. More info on Pattern Matching Codes
Similarly, the code |> occurring at the end of a search string ensures that the entire search string only matches text occurring at the end of a line.
Unlike |L and |N, |< and |> do not include the “newline” character(s) in the matched text. This is an important distinction when performing a replacement - with |L and |N the “newline” character(s) will be replaced; with |< and |> they are not replaced. With {CONFIG, File Handling, File type} set to Record mode, these codes match the beginning/end of a record.