Page 1 of 1
PERL point? =^..^=
Posted: Tue Apr 12, 2016 4:57 pm
by Mariasole
Hi!
I have another stupid question.
I have a list:
bla. bla bla bla?
bla. bla bla!
bla. bla bla bla bla
.
bla. bla bla bla@
bla bla bla bla
.
bla bla bla?
bla bla bla!
I would get this result:
bla. bla bla bla?
bla. bla bla!
bla. bla bla bla bla. ----> delete this!
bla. bla bla bla@
bla bla bla bla. ----> delete this!
bla bla bla?
bla bla bla!
How do I delete all the lines that end with a point with regex?
I tried this solution but it does not work!
filter lines of field "List" without regex pattern "(?:^\.)"
Thanks for your help!
Mariasole
=^..^=
Re: PERL point? =^..^=
Posted: Tue Apr 12, 2016 5:03 pm
by Thierry
what about this one ?
Regards,
Thierry
Re: PERL point? =^..^=
Posted: Tue Apr 12, 2016 6:08 pm
by FourthWorld
Re: PERL point? =^..^=
Posted: Tue Apr 12, 2016 6:51 pm
by Mariasole
FourthWorld wrote:Another option:
Wow! It works! Thanks Richard!
And how I can do, if I can abuse your patience, the exact opposite?
That is, remove from the list the phrases
that have NOT the point at end, with regex?
original list:
bla bla. bla bla bla!
bla bla bla bla bla.
bla bla. bla bla bla
bla. bla bla bla.
bla bla. bla bla bla
what I would
bla bla. bla bla bla! ----> delete this!
bla bla bla bla bla.
bla bla. bla bla bla ----> delete this!
bla. bla bla bla.
bla bla bla. bla ----> delete this!
bla bla. bla bla bla? ----> delete this!
thank you very much!
Mariasole
=^..^=
Re: PERL point? =^..^=
Posted: Tue Apr 12, 2016 6:56 pm
by Mariasole
Thierry wrote:what about this one ?
Regards,
Thierry
I am ashamed a bit but I meant in PERL: "
hey, removes the lines that end with a point!"
But probably I said "
lasjf Vlah f jdf jslgj sjghsdjkf!"
Mariasole
=^..^=
Re: PERL point? =^..^=
Posted: Tue Apr 12, 2016 7:09 pm
by Thierry
Mariasole wrote:
I am ashamed a bit but I meant in PERL: "
hey, removes the lines that end with a point!"
Mariasole
=^..^=
Code: Select all
put fld "xxxx" into T
filter T without regex pattern "\.$"
should work! or what did I miss?
for the opposite, just do:
or
Code: Select all
filter T without regex pattern "[^.]$"
or use the wildcards
so many ways....
Best,
Thierry
Re: PERL point? =^..^=
Posted: Tue Apr 19, 2016 6:17 pm
by Mariasole
Thanks Thierry,
sorry for the delay but I had the flu!
everything works, you are very kind!
I would like to ask you something. There is a web page where I can find the basics of regex art?
A page for hard heads like me?

A regex page compatible with LC?
Thank you
Mariasole
=^..^=