Author Topic: Hard time getting search/replace to work  (Read 3406 times)

davek

  • Community Member
  • Posts: 8
  • Hero Points: -2
Hard time getting search/replace to work
« on: July 13, 2009, 02:39:59 pm »
Why is it that what should be an easy search and replace never finds what I am searching for?  For instance the string "Images\images\" needs to be changed to "Images\images\converted\".  No matter how I format it nothing is found.   However, Notepad has no trouble.  What gives?  Note, I did not use the quotes in the actual search and I have no idea what a Unix regular expression is, as the explanation is just too complicated for what neurons I have left.  Search and replace for hex strings are just about as bad, except I finally figured out that one.  Perhaps there should be "dumb mode" for those of us who don't live in the C++ world?  Thanks for any advice

jimlangrunner

  • Senior Community Member
  • Posts: 354
  • Hero Points: 30
  • Jim Lang - always a student.
Re: Hard time getting search/replace to work
« Reply #1 on: July 13, 2009, 03:04:20 pm »
To start with, you want to make sure that "use regular expressions" is un-checked.  Sounds like you really don't want to use them.  They're pretty powerful, but can really muck things up if you're not expecting the results.

If that's unchecked, try a plain Find first.  Put a check in "incremental Search".  As you type, SE should "drill down" to the text you're searching for.  At the very least, this will tell you when it stops finding what you're after.  I've found some embarrassing misspellings that way.

If the (unchecked) Regular expressions & incremental search don't straighten you out, post back with what happened. 

Jim.


davek

  • Community Member
  • Posts: 8
  • Hero Points: -2
Re: Hard time getting search/replace to work
« Reply #2 on: July 13, 2009, 03:17:06 pm »
I am using version 8.0 at the moment and that does not seem to have an "incremental search" option.  I have version 10 as well and don't remember it in that either. Unchecking the regular expression box now seems to have helped but don't know why.  I also added a space before the first "Images". 

microcode

  • Community Member
  • Posts: 59
  • Hero Points: 9
Re: Hard time getting search/replace to work
« Reply #3 on: July 13, 2009, 04:38:49 pm »
What about the "Match whole word" option?  You probably want that one unchecked as well to mimic Notepad's search capabiltiy.

davek

  • Community Member
  • Posts: 8
  • Hero Points: -2
Re: Hard time getting search/replace to work
« Reply #4 on: July 13, 2009, 05:14:49 pm »
That had already been unchecked.  I must have futzed around with this for half an hour but Notepad worked right off.  Maybe I am just saying that sometimes we can have too many options in the effort to cover every single base possible.  Search/Replace has 23 options available on each search line using the right arrow list plus six check boxes plus two more options that come alive with the Files/Buffers button plus support for 9 tagged expressions plus two buttons for color coding which are greyed out.  It is not like I have never programmed or used other editors for -VB, Pascal, Fortran, Cobol, C, Palm C,  TACL macros and other stuff.  Maybe a Notepad option would fix my problem:-)  Obviously,  I need to just quit playing with grown up tools and go back to the M$ stuff. ???

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 131
Re: Hard time getting search/replace to work
« Reply #5 on: July 13, 2009, 05:51:04 pm »
I can understand the frustration.

Fellow users here are happy to help you figure out what is going on and how to solve the problem.  In order to solve the problem, we'll have to do some troubleshooting -- i.e. ask questions, get answers, offer suggestions, get feedback on exactly what happened in response to the suggestions, and possibly repeat that cycle.

For example:
- Can you attach a small sample file that contains the string you want to find (but which doesn't get found)?
- Can you attach a screen shot of the Find and Replace dialog with the options and search text that you're using?

jimlangrunner

  • Senior Community Member
  • Posts: 354
  • Hero Points: 30
  • Jim Lang - always a student.
Re: Hard time getting search/replace to work
« Reply #6 on: July 13, 2009, 07:33:47 pm »
Sorry.  I had assumed a recent release - should have qualified my response with such. 

For general editing Notepad is more than adequate.  For any kind of more advanced editing, a more advanced editor is better.  pspad and notepad++ are both good tools and the learning curve isn't too steep. 

Being a developer, the developer-specific features of VS appeal to me, and the learning curve, already spent, makes slick not so overpowering for general editing purposes.  So I use it for just about everything.  But it's not for the faint of heart.  There is a learning curve associated with it and it's got to be overcome to make slick useful to you. 

Don't quit playing with it if you like it.  It's a tool.  And variety is good.