S
S
serj372019-09-19 02:51:00
Regular Expressions
serj37, 2019-09-19 02:51:00

How to remove site names at the beginning of each row in a column?

There is a column:
www.yahoo.com:description1
http://site.ru:description2
www.site3.org:description3
http://w3k.biz:description4
www.yahoo.su:description5
http://w3k.biz; description6
www.yahoo.su; description7
How to regularly delete site names before the characters : and ; and leave only descriptions?
I have an option just before the character : or ; delete - ^[^:\r\n]+:[ \t]*
But as a choice of options .com: .biz: .su; I don't understand to put in a regular expression.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
dodo512, 2019-09-19
@serj37

https://regex101.com/r/IJsZ23/2
Search Pattern ^(?>https?:|)[^:;\n]+[:;](.*)
Replacement$1

V
vreitech, 2019-09-19
@fzfx

s/(?>https?:|).+?[:;]//
https://regex101.com/r/8naSxG/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question