CarlowOlson 0 Report post Posted October 4, 2012 Hello Friends, In programming, a regular expression is an expression that explains a pattern for a string. A string matches a regular expression if that string follows the pattern of that regular expression. For example, you may want to create an account system, allowing username to only have uppercase and lowercase letters, and numbers. While a user is registering, you can check their desired username against a regular expression involving only alphanumeric characters. If it matches, then the username is valid to your requests. If it does not, the user has put in a character that does not follow the pattern of the regular expression. In regular expressions, you can match certain characters, match a certain quantity of characters, match the casing of characters, and plenty more. The syntax of a regular expression varies throughout every programming language, but Perl is often used due to its wide variety of options. Perl is also incorporated into many web languages, such as PHP, making regular expressions less of a hassle. This is an example of a Perl regular expression, allowing a string with only alphanumeric characters, and an infinite length. Thanks and Regards Carlow Olson Share this post Link to post Share on other sites
rpgsearcherz 5 Report post Posted October 5, 2012 Hey, thanks for explaining what the regular expressions are. But I think it'd be more helpful to give a small tutorial/explanation on how to actually use them. For example, I know what they are but have no idea how to create them on my own. Share this post Link to post Share on other sites
NateP 1 Report post Posted October 5, 2012 I am also interested in getting more info on this. I have done a fair amount of php programming for various websites of my own as well as some for friends. When trying to learn how to use the the preg_match functionality in php though I always run into problems and have had to outsource that portion of the code to others.If this is a topic you are knowledgeable about, please write a tutorial for us. I would love to finally get my head wrapped around this stuff so I can write better code. Share this post Link to post Share on other sites