Jump to content
UBot Underground

Can anyone figure out why this won't work?


Recommended Posts

I have tested the below regex online using a regex editor and it gives me the desired results which is to return the first 5 words from a paragraph. Do I have to set it out differently in Ubot? I haven't used regex before so I am not sure if I am using it incorrectly.

 

(\w+\b.*?){5}

 

set(#title, $find regular expression(#finalspunarticle, "(\\w+\\b.*?){5}"), "Global")

 

 

Link to post
Share on other sites

Do I have to set it out differently in Ubot?

 

Make sure you are testing a .Net flavor of REGEX with your tool (there are many flavor with slightly minor differences, that could cause errors though...)

 

I found this to work flawlessly in UBS after tested there for results:

 

http://regexhero.net/tester/

 

Play with your code there and see what it selects from your own sample data.

 

When you're satisfied with those results, copy/paste the code in UBS

(use the Node View to paste, to allow for any extra escaping slashes as needed - pasting in Code View directly may cause errors)

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