Hello i need delete all special symbols like .,_- after symbol :
Example i got something like that
sfjsfajsafwp.pl:fsasaf.fssf
sfjsfajsafwp.pl:fsasaf.fssf
sfjsfajsafwp.pl:fsasaf.fssf.dgdg_
After this i expect:
sfjsfajsafwp.pl:fsasaffssf
sfjsfajsafwp.pl:fsasaffssf
sfjsfajsafwp.pl:fsasaffssfdgdg
(?:^.*?:|\G(?!^)).*?\K[-.,_]+
LEAVE EMPTY
. matches newline
Explanation:
(?: # non capture group
^ # beginning of line
.*? # 0 or more any character but newline
: # colon
| # OR
\G # restart from last match position
(?!^) # negative lookahead, make sure we are not at the beginning of a line
) # end group
.*? # 0 or more any character but newline
\K # forget all we have seen until this position
[-.,_]+ # 1 or more any of these characters.
# You can add all the characters you want to delete
# If you want to keep only letters, use [^a-zA-Z\r\n]+
Screenshot (before):
Screenshot (after):