Page 1 of 1

Using wildcards, I just don't get it

Posted: Tue Dec 13, 2011 2:00 pm
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?

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

Posted: Fri Dec 16, 2011 12:40 pm
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.