Using wildcards, I just don't get it

Tool for Search and Replace across multiple files.
User avatar
Pascal

Using wildcards, I just don't get it

Post by Pascal »

I checked several threads on this subject and have been messing around for about 3 hrs but I just can't get it working.

This is my problem:

I have to replace the following two lines of text in about 40 html files. The numbers VARY in all files, but all have 6 digits.

http://www.ncbi.nlm.nih.gov/omim/248500
for
http://omim.org/entry/248500

and, in the same file,

http://www.ncbi.nlm.nih.gov/omim/248500?dopt=Synopsis
for
http://omim.org/clinicalSynopsis/248500

How can I do this? What do I have to type exacly in which field?
User avatar
Pascal

Re: Using wildcards, I just don't get it

Post by Pascal »

I found it out myself using:
http://www.regular-expressions.info/quickstart.html

Find:
http://www.ncbi.nlm.nih.gov/omim/(......)[?]dopt=Synopsis

Replace:
http://omim.org/clinicalSynopsis/$1

and then just search and replace
http://www.ncbi.nlm.nih.gov/omim/
for
http://omim.org/entry/

Please move this thread to the regular expressions section.
Post Reply