Or use a tool such as AWK to match the numerical value: awk '$2+0 = 1 ' data_file.txt This will still match “-1.0”, since “-” is a non-word character if that’s a problem, you can extend the pattern and stop looking for words: grep -c ' 1\.0$' data_file.txt You don’t need to involve wc either, since you’re only interested in one match per line, and grep can count lines: grep -cw '1\.0' data_file.txt in “11.002”), you should ask grep to only match words: grep -wo '1\.0' data_file.txt | wc -l Search 'I want tornsearch' (1 hit in 1 file of 1 searched) new 15 (1 hit) Line 1: This is my file and I want to. Note: Multi-line expressions (involving n, r, etc) are not yet supported. Passing regex errors through Scintilla to Notepad++ is another. So this would prevent this dangerous behavior immediately. the whole file (because of the replace-operation). If you want to only count 1.0 as values, and not substrings ( e.g. Regular Expressions allow complicated and flexible search/replace using a specific syntax. Description of the Issue If a regular expression search fails because of an internal stack overflow or a similar exception, the whole file is marked as search result. Or “escape” the period so it matches a period: grep -o '1\.0' data_file.txt | wc -l To accurately count “1.0” occurrences, you should ask grep to search for fixed strings: grep -Fo 1.0 data_file.txt | wc -l Regex is also integrated with typical notepad applications such as Sublime, through which we explore the syntax of a search query. The letter K can be any capital letter from A to Z, where A stands for \x00, B stands for \x01, C stands for \x03, etc. Matches a character given in control notation. Matches a character given in hhhh unicode notation (unicode version only). Matches newline if the checkbox is checked means that the search will not occurs for each line but for the whole document when the dot is. Matches a character given in hh hex notation. You can customize it according to your needs. Regular expression means that you input is a regular expression.
Grep uses regular expressions by default, and “1.0” is a regular expression matching “1” followed by any character followed by “0”. If the search content '0-90-90-9' is changed to '0-90-9', corresponding to 1 or 123 or 12345 or.