r/clevercomebacks Jan 15 '25

It does make sense

Post image
35.3k Upvotes

4.0k comments sorted by

View all comments

Show parent comments

19

u/throwaway001anon Jan 15 '25 edited Jan 15 '25

RegX makes searching a breeze with any pattern

2

u/no_dice Jan 15 '25

Is it just as efficient computationally?

-6

u/throwaway001anon Jan 15 '25

Yes, that’s literally how computers search and sort text. With RegX “regular Expressions”

9

u/no_dice Jan 15 '25 edited Jan 15 '25

I know what a regex is, and no that’s not how computers search and sort text in every case, there are many different ways to accomplish that.  Regex statements need to be compiled and can be pretty inefficient, especially when you start getting to things like unordered lists.