Looking for strings in a file .
FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/F:file]
[/C:string] [/G:file] [/D:dir list] [/A:color attributes] [/OFF[LINE]]
strings [[drive:][path]filename[ ...]] /B At the beginning of a line, pairing mode . beginning of a line
/E Pairing patterns at the end of a line . end of a line
/L Use search strings by word . literally
/R Use the search string as a general expression .regular expressions
/S Search the current directory and all subdirectories for current directory and all subdirectories
Match file .
/I Specifies that the search is case insensitive .ignore case-sensitive
/X Print exactly matched lines . exactly
/V Print only lines without matching .invert-match That is, reverse matching
/N Print the number of lines before each matched line . Prints the line number
/M If the file contains a match , Print only its file name .a file contains a match.
/O Print character offset before each matching line .character offset
/P Ignore files with non printable characters .non-printable characters.
/OFF[LINE] Do not skip files with offline property sets .offline attribute set.
/A:attr Specifies a color property with a hexadecimal number . Please see "color /?" Specifies color attribute with two hex digits.
/F:file Read the list of files from the specified file (/ On behalf of the console ).Reads file list from the specified file
/C:string Use the specified string as the text search string . specified string as a literal search string(charactor)
/G:file Gets the search string from the specified file . (/ On behalf of the console ).Gets search strings from the specified file
/D:dir Find a semicolon delimited list of directories list of directories
strings Text to find .
Specify the file to look for . Unless the parameter has /C Prefix , Please use spaces to separate search strings .
for example : 'FINDSTR "hello there" x.y' In the file x.y Search for "hello" or
"there" . 'FINDSTR /C:"hello there" x.y' file x.y seek
"hello there". Quick reference to general expressions :
. wildcard : Any character
* repeat : Zero or more occurrences of previous characters or categories
^ Row position : The beginning of the line
$ Row position : The end of the line
[class] Character category : Any character in the character set
[^class] Complement character category : Any character that is not in the character set
[x-y] Range : Any character within the specified range
\x Escape: Metacharacters x The use of words in English
\<xyz Word position : The beginning of the word
xyz\> Word position : The end of the word of FINDSTR Details of common expressions , See online Command Reference .

Getting started command 13- String lookup enhancement :findstr More articles about

  1. Windows——cmd findstr String lookup enhancement instructions

    Looking for strings in a file . Copy the code as follows : FINDSTR [/B] [/E] [/L] [/R] [/S] [/I] [/X] [/V] [/N] [/M] [/O] [/P] [/F:file] [ ...

  2. Write your own document search , String search , Inquire about jar Bags and other tools

    File search —— Search for files in the current directory Know the approximate file name , Use findf FileName import argparse, re, os from os.path import jo ...

  3. Docker Getting started command

    Edit Docker Getting started command # Install the image sudo docker pull ubuntu:12.04# Image list sudo docker images# Running the mirror sudo docker run -t ...

  4. Python Learn the introductory course , String function expansion details

    Due to user feedback , In the basic article, the explanation of string function is too little , So write an article to explain the commonly used string function in detail . This article is about : Programmers take you ten days to get started Python, Play computer software development ( 3、 ... and ) Detailed explanation and expansion of string function in . If you want to learn ...

  5. Code cloud cooperation git Introduction command summary learning

    Catalog Code cloud cooperation git Introduction command summary learning Basic settings Basic command summary learning Preparations and basic ideas Basic commands The steps of building warehouse by code cloud Preparation work Specific operation method Remote warehouse basic command Tag related commands All orders are summarized Basic command summary ...

  6. Linux Common command file search which、find、locate Command to explain

    In the previous course , We introduced Linux Common file processing commands and permission management commands of the system , Today we will continue our study Linux Other processing commands of the operating system . 1. File search command which Command interpretation Command name :which The command is on the way ...

  7. KMP Algorithm &amp; String search algorithm

    KMP Algorithm Knuth–Morris–Pratt algorithm Knut, - Maurice - Pratt Algorithm algorithm kmp_search: input: an array of character ...

  8. Linux Research level basic entry command arrangement

    Linux Research level basic entry command arrangement restrictions and fetters , by twos and threes , Why so many , ha-ha !no zuo no die. Pure personal rookie notes , I hope the great God will accept it ! follow-up , unfinished !! Check system information uname -a - View kernel / fuck ...

  9. Rabin-Karp Fingerprint string search algorithm

    First calculate the hash function of the pattern string , If you find a substring with the same hash value as the pattern string , Then continue to verify that they match . This process is equivalent to saving the schema in a hash table , Then look up all the substrings in the text . But it doesn't need to be a hash table ...

Random recommendation

  1. css In the middle div There are several common ways to do this

    In the development process , A lot of needs need us to center on one div, such as html A piece of the document stream div, For example, the content part of the pop-up layer is separated from the document stream . Different situations have different ways of centering , Next, let's share some common centering methods . 1.text ...

  2. WebApi: Use the method name or controller name as the interface address

    There is a problem today : New WebApi The address of the interface generated by the project is named after the controller , In this case , Add... Before the method ActionName It doesn't work , But the previous project was ok . Interface code : public clas ...

  3. 【 turn 】Java How to traverse Map Yes

    stay Java How to traverse Map object How to Iterate Over a Map in Java stay java Middle traversal Map There are many ways . Let's take a look at the most common methods and their advantages and disadvantages . since java All in map all ...

  4. return x&gt;y?x:y ?: What do you mean by that? ?

    ? : It's a trinary operator , First judge ‘?’ Ahead , If it is true , perform ‘?’ The following sentence ,else, perform ‘:’ The following sentence ! return (x>y?x:y) namely if(x>y) perform xelse perform y

  5. ecshop The classification tree shows all

    1. stay page_header.lbi Add... To the document $GLOBALS['smarty']->assign('categories',get_categories_tree()); // Guarantee the home page ...

  6. Android The most popular frame XUtils The annotation mechanism of

  7. SQL Scan and execute... In the folder sql Script

    scene : All project database operations are implemented by stored procedures . There are many stored procedure updates every day / increase , Manually update stored procedures in the test environment , There is a certain probability of omission , And trouble ! therefore , You need a tool to save all the files in the folder         The stored procedure performs a ...

  8. js Get... In real time input data

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " ...

  9. openstack To configure

    Refer to teacher Lin Haifeng's configuration tutorial

  10. Android IntentService Use and source code analysis

    introduction Service Service is Android One of the four components , stay Android It plays an important role in lifting feet .Service Service is work UI In the thread , When your app needs to download a file or play music, it has not been working in the background for a long time UI world ...