←back to thread

Regex Isn't Hard (2023)

(timkellogg.me)
75 points asicsp | 1 comments | | HN request time: 0.264s | source
Show context
poisonborz ◴[] No.43750481[source]
This is truly one thing AI solved. Hard to write, easy to test. No one needs to learn this convoluted syntax in the future and we're all better for it.
replies(3): >>43750537 #>>43750588 #>>43750794 #
bazoom42 ◴[] No.43750794[source]
How would you know if a regex is correct if you dont understand it?
replies(1): >>43752218 #
poisonborz ◴[] No.43752218[source]
You have test strings covering all cases and they match accordingly? The same way you'd know when writing manually.
replies(1): >>43753334 #
1. bazoom42 ◴[] No.43753334[source]
Covering all cases? How would that be possible? Even if we only consider ASCII strings, there are 16.000 possible two-character strings, 2 million possible three-character strings and so on.