0

Regular Expression

Does c++'s regex and javascript's regex is a different thing, or do they behave differently? My problem: RegEx:(\$([^G])*T)|(T([^G])*\$) text: T$xxxxxxxG c++(regex_match in <regex>): 0(not matching) javascript([RegEx object].test): true(matching) regexr.com showed me that this has to be matched for js and php. So i wonder if c++'s regex is different

24th Feb 2020, 11:40 AM
Dri111
Dri111 - avatar
3 ответов
0
i dont think there's a difference, maybe in you'll need to use double backslash for something like \w. but its not really a big deal
24th Feb 2020, 11:58 AM
Taste
Taste - avatar
0
Im asking because they "acted" differently(If i can upload the input&output or code related to code coach, i will. Is it allowed to upload the code related to code coach?)(yep this is related to my code coach solving)(and i didnt used \w)
24th Feb 2020, 12:08 PM
Dri111
Dri111 - avatar
0
as long as its not pro
24th Feb 2020, 12:08 PM
Taste
Taste - avatar