Gautzilla
Gautzilla
CC#
Created by Gautzilla on 7/13/2023 in #help
❔ Match literal escape strings with a regex
Yup, I didn't even notice that you put only one hex digit, but I got the idea. Thanks!
21 replies
CC#
Created by Gautzilla on 7/13/2023 in #help
❔ Match literal escape strings with a regex
Whoops, I didn't think about that. It's for a simple AdventOfCode puzzle, so I don't know if I'll stump upon this issue, but that's a good point!
21 replies
CC#
Created by Gautzilla on 7/13/2023 in #help
❔ Match literal escape strings with a regex
OK Thanks everyone! I just kinda missed one layer of escape meaning. That makes sens!
21 replies
CC#
Created by Gautzilla on 7/13/2023 in #help
❔ Match literal escape strings with a regex
I tried either: string charASCIICodeRegex = "\\x[0-9a-f]{2}"; var Matches = Regex.Matches(line, charASCIICodeRegex); and: string charASCIICodeRegex = @"\x[0-9a-f]{2}"; var Matches = Regex.Matches(line, charASCIICodeRegex); without success
21 replies