Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7073321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:54:55+00:00 2026-05-28T05:54:55+00:00

Sometimes FINDSTR with multiple literal search strings fails to find all matches. For example,

  • 0

Sometimes FINDSTR with multiple literal search strings fails to find all matches. For example, the following FINDSTR example fails to find a match.

echo ffffaaa|findstr /l "ffffaaa faffaffddd"

Why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T05:54:56+00:00Added an answer on May 28, 2026 at 5:54 am

    Apparantly this is a long standing FINDSTR bug. I think it can be a crippling bug, depending on the circumstances.

    I have confirmed the command fails on two different Vista machines, a Windows 7 machine, and an XP machine.
    I found this findstr – broken ??? link that reports a similar search fails on Windows Server 2003, but it succeeds on Windows 2000.

    I’ve done a number of experiments and it seems all of the following conditions must be met for the potential of a failure:

    • The search is using multiple literal search strings
    • The search strings are of different lengths
    • A short search string has some amount of overlap with a longer search string
    • The search is case sensitive (no /I option)

    In every failure I have seen, it is always one of the shorter search strings that fails.

    It does not matter how the search strings are specified. The same faulty result is achieved using multiple /C:"search" options and also with the /G:file option.

    The only 3 workarounds I have been able to come up with are:

    • Use the /I option if you don’t care about case. Obviously this might not meet your needs.

    • Use the /R regular expression option. But if you do then you have to make sure you escape any meta-characters in the search so that it matches the result expected of a literal search. This can be problematic as well.

    • If you are using the /V option, then use multiple piped FINDSTR commands with one search string each instead of one FINDSTR with multiple searches. This also can be a problem if you have a lot of search strings for which you want to use the /G:file option.

    I hate this bug!!!!

    Note – See What are the undocumented features and limitations of the Windows FINDSTR command? for a comprehensive list of FINDSTR idiosyncrasies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sometimes it's very difficult to find an error in an application because of static
Sometimes I create an Exception instance without throwing it (for example to pass it
Sometimes when reading others' C# code I see a method that will accept multiple
Sometimes it's nice to start over. In C++ I can employ this following simple
Sometimes I need the following pattern within a for loop. At times more than
Sometimes, I find some class names including Aware such as ApplicationContextAware and MessageSourceAware (spring).
Sometimes I got a crash of my application with the following stack trace :
Sometimes I'm getting the FB is not defined issue when loading the http://connect.facebook.net/en_US/all.js I've
Sometimes I need to set some string values from code, for example: Page.Title =
Sometimes when I'm editing page or control the .designer files stop being updated with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.