Page 1 of 1

How do I do this ?

Posted: Fri Mar 23, 2001 6:59 pm
by Ozieo
I have a passwordlist which I want to clear out, like this :

I want to become:

-|(XH19662)|-http://www.kellyashton.com/members/index.htm LOGiN:JOHN55 PASSWoRD:JOHN58
-|(XH19674)|-http://www.newyorkwhores.com/members/ LOGiN:friends PASSWoRD:virginia
-|(XH19675)|-http://www.teeniegals.com/members/ LOGiN:hard PASSWoRD:boner

to become this:

http://JOHN55:JOHN58@www.kellyashton.co ... /index.htm
http://friends:virginia@www.newyorkwhores.com/members/
http://hard:boner@www.teeniegals.com/members/

Can any tell me the exact regular expression for Search & Replace ?

Thanks !

Re: How do I do this ?

Posted: Fri Mar 23, 2001 8:30 pm
by Jeff Epstein
Assuming that you want to get rid of all text following the first space (this is what your example seems to show), then use this replacement expression:


Replace what: \([^ ]+\) .*
Replace with this: \1
[X] Regular Expression

This replaces preserves all text up to but not including the first space, and then obliterates the space and all following text up to the end of the line.

For further regular expresion examples, see my TextPad Regular Expression FAQ.


http://jeffyjeffy.com/textpad/documenta ... n_faq.html

In fact, I'll add your specific question as an example soon

:' )


Jeff
http://www.jeffyjeffy.com/textpad

Re: How do I do this ?

Posted: Sat Mar 24, 2001 4:56 am
by Randall McDougall
Sorry Jeff, have a second look -- he wants to use imbedded logon syntax for the url.

The expression for the line given should be:

Matching RegExp:

^-|.+|-http://\([^ ]+\) +LOGiN:\([^ ]+\) +PASSWoRD:\([^ ]+\)

Replace with:

http://\2:\3@\1

Re: How do I do this ?

Posted: Sat Mar 24, 2001 4:59 am
by Randall McDougall
Sorry Jeff, have a second look -- he wants to use imbedded logon syntax for the url.

The expression for the line given should be:

Matching RegExp:

^-|.+|-http://\([^ ]+\) +LOGiN:\([^ ]+\) +PASSWoRD:\([^ ]+\)

Replace with:

http://\2:\3@\1

Re: How do I do this ?

Posted: Sat Mar 24, 2001 9:34 am
by Ozieo
Ah Thanks a lot !!

That made it exactly how it needed to be ! :-)

Thank you very much Randall & Jeff !

Re: How do I do this ?

Posted: Sat Mar 24, 2001 12:35 pm
by Jeff Epstein
Ah, yes...

Good call Randall.