4 ms·
Probably to check if a regular expression is valid
by afiori 7y ago
Probably to check if a regular expression is valid
- xfitm3 7y agoCouldn't you just compile it and check for return value?
- ChrisSD 7y agoYes, checking to see if a regular expression is valid is useful but that wasn't what I was asking. Why specifically would you want to use a regular expression for this job?
- Lordarminius 7y agoMaybe because you can :/
- afiori 7y agoThe simplest explanation is because you already have a lot of functionality implemented this way. Still probably the library you are using exposes a validation function...