This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes How to search a file which contains the string either *= or =* Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply Bookmark "How to search a file which contains the string either *= or =*" Watch "How to search a file which contains the string either *= or =*" New topic
Author

How to search a file which contains the string either *= or =*

sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
Dear All,
I am using the Eclipse tool.I want to search a file in my application which contains the String either *= or =*.

But when i use context text: *= and file name: *.java then it search a file which contains = ,* and *= string.
But i want to search a file which should contains only *= or =*.

Please suggest me for the needful.

Please let me know in case of any concerns.

Thanks in Advance.

Regards
Sumanta Pand
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14487
    
    7

You could set up a regular expression search, but for this problem, it's probably just as easy to do 2 regular searches, one for "*=" and one for "=*".

Go to the "File Search" tab on the search dialog. See the text below the "Containing Text" input? Where it says "(* = any string, ? = any character, \ = escape for literals: * ? \)"?

They're not joking.

Enter "\*=" to search for "*=". enter "=\*" to search for "=*".


Customer surveys are for companies who didn't pay proper attention to begin with.
sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
Dear Mr. Tim,
Thanks for your help.Now its working properly.

Best Regards,
Sumant Panda
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to search a file which contains the string either *= or =*
 
Similar Threads
string to be replaced in a file
B&S: How to know which record in search Jtable is selected
Highlight the words in files( doc, excel, pdf etc) using java
find
How String tokeinzer is advantegous then Strings utility method