Ant 1 Posted April 3, 2013 Report Share Posted April 3, 2013 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") Quote Link to post Share on other sites
Lucius 7 Posted April 4, 2013 Report Share Posted April 4, 2013 try this (\w+\b.*?){5,5} Quote Link to post Share on other sites
VaultBoss 310 Posted April 4, 2013 Report Share Posted April 4, 2013 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) 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.