![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Quick Regexp Help
Hi,
Wondering if someone can help me. I'd like to replace the following code <body bgcolor="#FFFFFF"> some text<br> <br> with this <body bgcolor="#FFFFFF"> <h1>some text</h1> on many files. Can I do this with regular expressions? Is this the best way? Eg. Search for <body bgcolor="#FFFFFF"> (\w+)<br> <br> Replace with <body bgcolor="#FFFFFF"> <h1>(\w+)</h1> |
|
|||
|
Re: Quick Regexp Help
Yes, you can. But you need something more like:
<body bgcolor="#FFFFFF"> (.*)<br> <br> Replace with <body bgcolor="#FFFFFF"> <h1>$1</h1> Note, this is untested as I prefer the command line and PERL for regexp based search and replace across file sets. [q]Originally posted by: Doigy Can I do this with regular expressions? Is this the best way? Eg. Search for <body bgcolor="#FFFFFF"> (\w+)<br> <br> Replace with <body bgcolor="#FFFFFF"> <h1>(\w+)</h1>[/q] |
|
|||
|
Re: Quick Regexp Help
|
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|