replace line based on text in beginning of line

General questions about using WildEdit

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
vinnie_barbarino
Posts: 1
Joined: Thu Dec 08, 2011 5:45 pm

replace line based on text in beginning of line

Post by vinnie_barbarino »

I know I need to purchase the reference book, but how would you do the following:

replace a line starting with: <p><a href=

or

replace a block of variable text starting with: <p><a href=
and ending with: </table>

I will buy three licenses if you can show me how this is done.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

To replace a line starting with <p><a href= :
Search for: ^<p><a href=.*

[X] Regular expression
[ ] "." matches end of line characters [i.e., not selected]

Replace with: [whatever you want to replace it with]
You haven't specified your second question precisely enough. If there is at most one occurrence of <p><a href= and at most one occurrence of </table> in each file, then to replace text possibly containing newlines, starting with <p><a href= and and ending with </table> :
Search for: ^<p><a href=.*</table>

[X] Regular expression
[X] "." matches end of line characters

Replace with: [whatever you want to replace it with]
Post Reply