+ 2
rules of correct regexp for sololearn compiler
Hi, Everyone. I got a problem when i started to use regex on c++. If I run next code at sololearn, i got error: https://code.sololearn.com/c778FWIhM0pN/#cpp This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. terminate called after throwing an instance of 'std::regex_error' what(): regex_error. Does anyone now what's wrong in this regex? Because when i run this code at Code::Blocks 16.01 with compiler TDM
5 Respostas
+ 7
Denial of service attacks.
https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
+ 4
*S_e_c_u_r_i_t_y*(maybe didn't view the code yet)
+ 2
Lol, the C++ regex in GCC was implemented in GCC version 4.9.0.
Sololearn uses version 4.8.1, so regex is not correctly implemented here.
+ 1
it's too sad. how can create elegant, flexible and 'golf' code without regex? especially almost all challenges could be done with regex easily... but it will be good recursion: compiler or so is checking with own regex on evil regex before compilation regex ... nah?
then last question: why do I can use #include <regex>, but it's forbidden? or is it restricted? or does (how Dennis said) it implement incorrectly?
0
security from what? regex is a part of language features.