Jump to content
UBot Underground

Recommended Posts

Guys i have this Block of Text what i am trying to do  is Find All Links inside it using some sort of Universal Regex for Finding URL-s and then replace it with a text "mariners"

 

I guess i need help with logic can anyone help??

 

 

My Code So Far

 set(#description,$replace($scrape attribute(<id="eow-description">,"innertext"),$new line,"  "),"Global")

set(#description,$replace(#description,$find regular expression(#description,),"konjine"),"Global")
set(#watchcount,$scrape attribute(<class="watch-view-count">,"innertext"),"Global")
set(#video title,$scrape attribute(<id="eow-title">,"innertext"),"Global")

 

 

 

  Today I show you how to teach your dog to sit. Teaching a dog to sit on command is an extremely easy thing to do when you know the correct training techniques. I've studied dog training techniques my whole life & have found that this method is without a doubt the most effective. Not only is it quick & easy, it also works on all breeds of dogs of all ages! So it doesn't matter if you have a new puppy or an old turd, you'll see results very quickly! Click Here To Eggscribe! --► http://bit.ly/Eggscribe SHARE this incredibly fast dog training technique around! TWEET IT► http://ctt.ec/90mp7 EGGBOOK IT► http://bit.ly/TeachDogToSit Have a video Suggestion? Post it in the Comments Section, Contact me through my Facebook page or Tweet me! Connect with me! Facebook ► http://www.facebook.com/HowToBasic Twitter ►

Instagram ► http://instagram.com/HowToBasic 2ND Channel ► http://www.youtube.com/HowToBasic2 Website ► http://www.howtobasic.net/ Keek ► https://www.keek.com/howtobasic   T-Shirts & Eggy Merchandise ► http://howtobasic.spreadshirt.com/ Want to send me something? Send mail to ► HowToBasic PO Box 334 Cannington, WA 6987 Australia Know someone that's struggling to teach their dog to sit? Link them to this video! They'll truly appreciate it! HowToBasic howtobasic How To Basic

 

 

Any Help is Greatly Appreciated!

Link to post
Share on other sites

itexspert,

Try this code usingHelloInsomnia 's regex:

set(#LinkText" Today I show you how to teach your dog to sit. Teaching a dog to sit on command is an extremely easy thing to do when you know the correct training techniques. I\'ve studied dog training techniques my whole life & have found that this method is without a doubt the most effective. Not only is it quick & easy, it also works on all breeds of dogs of all ages! So it doesn\'t matter if you have a new puppy or an old turd, you\'ll see results very quickly! Click Here To Eggscribe! --► http://bit.ly/Eggscribe SHARE this incredibly fast dog training technique around! TWEET IT► http://ctt.ec/90mp7 EGGBOOK IT► http://bit.ly/TeachDogToSit Have a video Suggestion? Post it in the Comments Section, Contact me through my Facebook page or Tweet me! Connect with me! Facebook ► http://www.facebook.com/HowToBasic Twitter ►

Instagram ► http://instagram.com/HowToBasic 2ND Channel ► http://www.youtube.com/HowToBasic2 Website ► http://www.howtobasic.net/ Keek ► https://www.keek.com/howtobasic   T-Shirts & Eggy Merchandise ► http://howtobasic.spreadshirt.com/ Want to send me something? Send mail to ► HowToBasic PO Box 334 Cannington, WA 6987 Australia Know someone that\'s struggling to teach their dog to sit? Link them to this video! They\'ll truly appreciate it! HowToBasic howtobasic How To Basic", "Global")
set(#LinkText$replace regular expression(#LinkText"(http:\\/\\/|https:\\/\\/)(www\\.|)[a-zA-Z0-9-\\.]+\\.[a-zA-Z]\{2,4\}(\\/[a-zA-Z0-9\\/\\.?#_-]+|)""mariners"), "Global")

 

The result will be:

#LinkText:  Today I show you how to teach your dog to sit. Teaching a dog to sit on command is an extremely easy thing to do when you know the correct training techniques. I've studied dog training techniques my whole life & have found that this method is without a doubt the most effective. Not only is it quick & easy, it also works on all breeds of dogs of all ages! So it doesn't matter if you have a new puppy or an old turd, you'll see results very quickly! Click Here To Eggscribe! --► mariners SHARE this incredibly fast dog training technique around! TWEET IT► mariners EGGBOOK IT► mariners Have a video Suggestion? Post it in the Comments Section, Contact me through my Facebook page or Tweet me! Connect with me! Facebook ► mariners Twitter ► mariners Instagram ► mariners 2ND Channel ► mariners Website ► mariners/ Keek ► mariners   T-Shirts & Eggy Merchandise ► mariners/ Want to send me something? Send mail to ► HowToBasic PO Box 334 Cannington, WA 6987 Australia Know someone that's struggling to teach their dog to sit? Link them to this video! They'll truly appreciate it! HowToBasic howtobasic How To Basic

  • Like 1
Link to post
Share on other sites

ok regex works in some cases i found out that in this one it doesn't

 

  3 How To Pick A Lock 444,048 All it takes is a bobby pin. Check out more awesome BuzzFeedBlue videos! mariners MUSIC On The Lam Licensed via Warner Chappell Production Music Inc. GET MORE BUZZFEED: www.buzzfeed.com www.buzzfeed.com/video www.youtube.com/buzzfeedvideo www.youtube.com/buzzfeedyellow www.youtube.com/buzzfeedblue www.youtube.com/buzzfeedviolet www.youtube.com/buzzfeed BUZZFEED BLUE Tasty short, fun, inspiring, funny, interesting videos from BuzzFeed. From incredible science facts to amazing how-to's and DIYs, BuzzFeed Blue will entertain, educate, spark conversation about all the little things that matter in life. Bite-size knowledge for a big world. Just like BuzzFeedVideo, but more blue.

 

Does anyone have more precise regex for eliminating these links?

Link to post
Share on other sites

I think you should use 2 regular expressions - those for real links you've been given, and a new one for removing url's that are not "active" (no <a> tag in html). 

For the text example above, you should be able to use this regex example I made: https://www.regex101.com/r/sR5nA6/1

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...