AI vs. Regular Expressions

I haven’t really found anything with any preliminary google searches.
So - has there ever been any work done on this?
How well would a neural network fair against regular expression pattern matching?
Say - for email addresses? Would it be possible to build a NN that would outperform regex?
Just a passing thought - yes, I’m at that phase in a project right now - gotta love form validation.
Anyway - just wanted to get some opinions. :slight_smile:

2 Likes

Hi @CreationTribe,

Yes it would be possible to train a neural network as a classifier for email addresses. There are simple regex’s for email addresses that are 100% successful, so the neural network would naturally not perform as well as this. However the neural net would not have to be given the definition of a valid email address, it would approximate it via all the samples you provide.

The reason nobody would be doing it is because email address is a human invention that we have a simple formal definition of, so NN’s are unnecessary in this scenario.

That said, there are plenty of software vendors out there using regex’s and calling it AI :wink:

4 Likes