Hi,
In a text file I have multiple lines that I want to delete. I am using the begening of a line command to get rid of these lines. But It looks like I have to paste one command at a time to make it work. I would like to paste all of these regex to delete the lines that I want.
^Unique Visitor.*?$
^Visitors Who Visited Once.*?$
^Visitors Who Visited More.*?$
^Average Visits per Visitor.*?$
Instead of
^Unique Visitor.*?$
make it run than delete than the next one
^Visitors Who Visited Once.*?$
etc.. ect..
Is there something missing in my expression?
Thanks
deleting multiple lines at a time in the "Find what&quo
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
From WE's help file:
^(Unique Visitor)|(Visitors Who Visited Once)|(more options...).*?$
HTH
So you're looking at something likeAlternatives Alternatives occur when the expression can match either one sub-expression or another, each alternative is separated by a "|", or by a newline character if that option is set. Each alternative is the largest possible previous sub-expression; this is the opposite behavior from repetition operators.
Examples:
"a(b|c)" could match "ab" or "ac".
"abc|def" could match "abc" or "def".
^(Unique Visitor)|(Visitors Who Visited Once)|(more options...).*?$
HTH
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
You need to adjust the parentheses so that the first alternative doesn't include the "^" and the last one doesn't include the ".*?$":s_reynisson wrote:So you're looking at something likeAlternatives ... Each alternative is the largest possible previous sub-expression...
^(Unique Visitor)|(Visitors Who Visited Once)|(more options...).*?$
Code: Select all
^(Unique Visitor|Visitors Who Visited Once|more options...).*?$
- s_reynisson
- Posts: 939
- Joined: Tue May 06, 2003 1:59 pm
To something like this perhaps?
Code: Select all
^((Unique Visitor)|(Visitors Who Visited Once)|(more options...)).*?$
ben_josephs wrote:You need to adjust the parentheses so that the first alternative doesn't include the "^" and the last one doesn't include the ".*?$":Code: Select all
^(Unique Visitor|Visitors Who Visited Once|more options...).*?$
Then I open up and see
the person fumbling here is me
a different way to be
the person fumbling here is me
a different way to be
-
- Posts: 2461
- Joined: Sun Mar 02, 2003 9:22 pm
The inner parentheses serve no purpose unless you need to capture the particular alternative subexpression that matched, for use in the replacement, either in a matched subexpression expression ($N) or in a conditional expression expression ($NE:E).s_reynisson wrote:Code: Select all
^((Unique Visitor)|(Visitors Who Visited Once)|(more options...)).*?$