Hi all,
I know how to stringreplace but I'm not sure how to delete the entire url or email addresses... I'm trying to remove all urls and emails from a readfile variable that I placed. My goal is to pretty much delete the entire line with other texts as well... any line that contacts an email or url, delete that line...... any guidence and help on this is greatly appreciated!
Readfile Strip Line with URL or @
Moderators: Dorian (MJT support), JRL
Re: Readfile Strip Line with URL or @
forget regex, which I have a learning curve of learning... i just use whatever MS provided:
Code: Select all
ReadFile>I:\test\desc.txt,desc
Separate>desc,CRLF,descar
If>descar_count>0
Let>k=0
Let>newdesc=
Repeat>k
Let>k=k+1
Let>lineout=descar_%k%
Let>atsign=@
Position>http,%lineout%,1,addthis
Position>%atsign%,%lineout%,1,addthis2
If>{(%addthis%>1) OR (%addthis2%>1)}
//do nothing
Else
Let>newdesc=%newdesc%%CRLF%%lineout%
Endif
Until>k=descar_count
Endif
Trim>%newdesc%,newdesc
mdl>%newdesc%