+ 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

13th Oct 2017, 6:59 AM
Yuri Lyagin
Yuri Lyagin - avatar
5 ответов
13th Oct 2017, 8:22 AM
jay
jay - avatar
+ 4
*S_e_c_u_r_i_t_y*(maybe didn't view the code yet)
13th Oct 2017, 7:53 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 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.
13th Oct 2017, 8:44 AM
Dennis
Dennis - avatar
+ 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?
13th Oct 2017, 9:12 AM
Yuri Lyagin
Yuri Lyagin - avatar
0
security from what? regex is a part of language features.
13th Oct 2017, 7:55 AM
Yuri Lyagin
Yuri Lyagin - avatar