Malak Sadek Malak Sadek - 3 months ago 30
C++ Question

How to express an assembly lw/sw instruction using regular expression regex library?

I want to detect when the user enters "lw 2, 3(9)" , but it can't read the parenthesis, I used this code but it still doesn't detect the parenthesis.

{ R"((\w+) ([[:digit:]]+), ([[:digit:]]+) (\\([[:digit:]]+\\)) )"}

Can someone please help?

R"((\w+) (\d+), (\d+)(\(\d+\)))"

worked for me