Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm a total newb with expressions and looking for a quick way to do this. Trying to delete everything in between the && to TAG

URL GOTO=http://www.URLHERE.com/&&TXT:Just<SP>Because<SP>I'm<SP>Skinny<SP>Does<SP>NOT<SP>Mean<SP>I<SP>Have<SP>an<SP>Eating<SP>Disorder
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:aspnetForm ATTR=VALUE:Submit
share|improve this question

migrated from stackoverflow.com Feb 23 '10 at 16:04

This question came from our site for professional and enthusiast programmers.

    
InRe: close votes. I tend to think of regular expressions as a programming topic even in the context of a simple search and replace function. –  dmckee Feb 23 '10 at 2:11
add comment

1 Answer 1

Replace this:

&&.*?\bTAG\b

with an empty string. That will do it. It also makes sure that "TAG" is a separate word. You should also turn on multiline mode if the line break in your example is not only for formatting, or use:

&&[\s\S]*?\bTAG\b
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.