@Quincy-Gouveia NON-insensitive refers to case-sensitivity, that is, whether or not the search is sensitive to capital letters being different from lower-case letters. For example, searching for bla in a case-insensitive search would ignore the case of the letters and could match Bla, BLA, or bla, but searching for bla in a case-sensitive (= NON-insensitive) search would only match bla. This is the same as checking (sensitive) or unchecking (insensitive) the Match case checkbox in the Find dialog box in Notepad or Notepad++. @guy038 referred to it as NON-insensitive (a double-negative) to explain the meaning of the -i (insensitive) flag.
Simple answer:
Type -- in the Find what: box, making sure that especially the Normal Search Mode is checked. However, this will not include any following characters in the match, which may or may not matter, depending on what you want to do after you find this text.
Exact answer:
I wasn’t aware Windows Notepad allowed you to use wildcards, but I assume that you’re asking about how to search in a way equivalent to using the Windows wildcards * and ?. You want to search for two hyphens --, followed by a space ( ), followed by 0 or more of any character, and include any characters after the space in the match, correct?
I’m actually surprised your search did not succeed, unless perhaps you had the Normal Search Mode selected instead of Regular Expression? A regex of -- * should search for two hyphens followed by 0 or more spaces. But read on to discover the technically correct answer that actually selects the text after the hyphens + space combination.
One good primer on Regular Expressions can be found at http://www.regular-expressions.info, but here’s a 3-point start:
To search for
any character, use the full stop/period . character. Equivalent to Windows wildcard ?.
To search for
0 or more occurrences of a character, follow the character with an asterisk *. Windows uses the asterisk by itself to mean 0 or more occurrences of
any character, but Regular Expressions uses it to
act on the character before it. For example, ap* could match anchor (a plus 0 p chars following), ape (a plus 1 p char following) or apple (a plus 2 p chars following), etc.
To search for
0 or more occurrences of any character on that line, use .* This is equivalent to Windows wildcard *, but requires the full stop .
before it.
Here is how you would search in Notepad++ for any line that contains two hyphens, followed by a space, and include all following text on that line in the match:
Move back to the
very beginning of your file
Open the
Replace dialog ( Ctrl + H )
Type this regex string in the box following
Find what: -- .*
Leave all the options
unticked.
Select the
Regular expression search mode.
Click on the
Find (or
Find > >) button.
If you want to remove, replace, or modify the SQL comment, or if you want to require that the comment start at the beginning of the line, you can do either of those and more. Please post again with more details if you need help with what you want to do next. I also would strongly recommend at least skimming a Regular Expression tutorial.