How to do it?

Off-topic posts of interest to the "Everything" community.
Post Reply
salazor
Posts: 258
Joined: Tue Jun 17, 2014 10:52 am

How to do it?

Post by salazor »

How to change this text to such

Code: Select all

mick_74656[MENTION=9015]hotmail[/MENTION].com
to

Code: Select all

mick_74656@hotmail.com
I try replace with regex [MENTION=.*] to @ but not working
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: How to do it?

Post by ovg »

Try Perl Regex:
find:

Code: Select all

\[(mention).*\]hotmail\[/\1\]
replace with:

Code: Select all

@hotmail
salazor
Posts: 258
Joined: Tue Jun 17, 2014 10:52 am

Re: How to do it?

Post by salazor »

Not quite working because it is next is [MENTION=13551297]aol[/MENTION]
and this command replace on @hotmail
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: How to do it?

Post by ovg »

Find:

Code: Select all

 \[mention.*\](.*)\[/mention\]
replace with:

Code: Select all

@\1
btw there isn't something about aol or anything else in the first post
salazor
Posts: 258
Joined: Tue Jun 17, 2014 10:52 am

Re: How to do it?

Post by salazor »

This working perfect! - Thanks.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: How to do it?

Post by ovg »

You are welcome!
Post Reply