Jump to content
UBot Underground

Regular Expressions in UBot


Recommended Posts

Can someone please explain how we use regular expressions in Ubot?

 

What I'm trying to do is strip all the urls from a variable using this:

 

The Actual code I used to remove urls from a variable:

/\https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/g

 

But I can't figure out how to do it.

 

Thanks

 

 

Edit: I hope this saves others some time...

 

I changed the code above to a javascript since the first one I had posted was in php.

 

If anyone needs an online tool to help with the the learning of regex you can try this. http://gskinner.com/RegExr/ Also the software that "webautomationlab" posted below seems pretty promising as well.

 

The ubot code I used to understand how it all works was shared by "theskinnys". http://ubotstudio.com/forum/index.php?app=core&module=attach&section=attach&attach_id=626 It

 

Good Luck!

Link to post
Share on other sites

I have no clue how regex works. I tried to follow some standard tutorials about the matter but I didn't really get anything of it, haha.

 

Oh well, I'm sure someone else knows this.

 

Yeah it is a bit confusing, but im sure if there was a video tutorial on how to go about coding it would help a lot.

Someone, please...

Link to post
Share on other sites

Update:

 

i must have had a brain fart for like 5 hours or so. The reason I couldn't get it to work was because i was using a php code instead of javascript. lol.

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...