Jump to content

PCRE expressions


fantomel

Recommended Posts

There is a whole spectrum of things that I might commonly validate on. Basic things like minimum/maximum lengths (of strings, of items in a collection, etc.), character restrictions (alphanumeric, etc.) to whether a specified value (e.g. an order under) satisfies our application-specific structure, any form of user input so things like telephone numbers, credit card numbers, URLs, email addresses, date and times, and so on.

 

Also I would bear in mind that regular expressions, while a useful tool, are not a catch-all solution. You'll probably want to use "basic" string/number/etc. functions and much more complex logic all alongside some regex, as part of the validation.

Link to comment
https://forums.phpfreaks.com/topic/198845-pcre-expressions/#findComment-1043739
Share on other sites

yeah i know that filter functions are awsome there is not way you can't love them and not start using them when you have everything you need right there :D.

And yes i think it's really hard to make this class work out the way it should be i need to consider many things, approaches, and existing functions not only regular expressions.

Link to comment
https://forums.phpfreaks.com/topic/198845-pcre-expressions/#findComment-1044067
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.