Marani 80 Posted October 29, 2018 Report Share Posted October 29, 2018 (edited) Hi, How do I keep curly braces in Ubot when writing a regex? it's \d{3}\r\n\W but when I click OK, ubot removes curly braces and it becomes \d3\r\n\W Quoting the regex generates "\d\{3\}(?=\r\n\W)" which doesn't work. Read & tried these already, none works: http://network.ubotstudio.com/forum/index.php/topic/21784-stripping-out-the-curly-braces/ http://network.ubotstudio.com/forum/index.php/topic/19610-find-regular-expression-issue-strips-out-curly-brackets/ http://network.ubotstudio.com/forum/index.php/topic/14681-how-to-escape-characters-trying-to-fill-in-a-form/ http://network.ubotstudio.com/forum/index.php/topic/9615-curly-brackets-in-ubot-regex/ Regex is correct because in Ubot's Regex Editor it selects the desired numbers. The solutions like adding a number and comma to the curly braces don't work. Sample text (the regex is supposed to get the number 542): Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's. standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. 542 It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. Thanks Edited October 29, 2018 by Marani Quote Link to post Share on other sites
Misha 5 Posted October 29, 2018 Report Share Posted October 29, 2018 (edited) Hi,How do I keep curly braces in Ubot when writing a regex? it's \d{3}\r\n\W but when I click OK, ubot removes curly braces and it becomes \d3\r\n\W Quoting the regex generates "\d\{3\}(?=\r\n\W)" which doesn't work. Check this regexp: \\d\{3\}[\\n\\r]*\\W Example: alert($find regular expression("123{$new line}+","\\d\{3\}[\\n\\r]*\\W")) where "123{$new line}+" - your text. If you need this code: \d\{3\}(?=\r\n\W) Correct code for ubot: \\d\{3\}(?=\\r\\n\\W) If this code not will work for you, i think, you need use $eval and javascript. Edited October 29, 2018 by Misha Quote Link to post Share on other sites
Marani 80 Posted October 29, 2018 Author Report Share Posted October 29, 2018 No that's not working. thanks for trying to help tho. Added a sample text to the post. Quote Link to post Share on other sites
Marani 80 Posted October 29, 2018 Author Report Share Posted October 29, 2018 TJ helped me with the right regex for this and it's solved now Quote Link to post Share on other sites
Misha 5 Posted October 29, 2018 Report Share Posted October 29, 2018 My RegExp for this string: (?m)^[0-9]+$ Quote Link to post Share on other sites
HelloInsomnia 1103 Posted November 4, 2018 Report Share Posted November 4, 2018 For the record whenever you have a single parameter in the curly braces it goes away, so put two parameters even if they are the same, example: set(#numbers,$find regular expression(1234,"\\d\{4,4\}"),"Global") 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.