Linux regular expression and file format processing learning summary

1. Regular expression is a method of processing strings. It is used to process strings in behavioral units.

2. With the help of some special symbols, regular expressions can allow users to easily find, delete, and replace a specific string processing program

3. As long as the tool program supports regular expressions, the tool program can be used for string processing of regular expressions

4. Regular expressions are completely different from wildcards. Wildcards represent a function of the bash interface, but regular expressions are a way of representing strings.

5. When using grep or other tools to compare strings of regular expressions, because the encoding problem will have different states, it is best to set variables such as lANG to C or English language such as en

6. grep and egrep are two common programs in regular expressions. Among them, egrep supports more rigorous regular expression syntax

7. Due to different coding systems, different language families will cause differences in the data selected by regular expressions. Therefore, it is better to use special symbols such as [:upper] to replace the coding range.

8. Due to the different rigor, there are more rigorous extended regular expressions on top of regular expressions

9. The special characters of basic regular expressions are * ? [] [-] [^] ^ $ etc.

10. Common regular expression tools include grep sed vim, etc.

11. printf can format data output through some special symbols

12. Awk can use "field" as the basis to rearrange and output data

13. In the comparison of files, diff and cmp can be used for comparison, among which diff is mainly used for the comparison of old and new versions of plain text files

14. The patch command can update the old version data to the new version

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326798099&siteId=291194637