The Absolute Bare Minimum Every Programmer Should Know About Regular Expressions

free web hosting
Free Web Hosting > Computers & Tech > Programming > Programming General > Design Practises, Patterns & Ideas

The Absolute Bare Minimum Every Programmer Should Know About Regular Expressions

dserban
Well, the title says it all and I really don't have anything to add to that, except to say that this is a really, really powerful technology that is very pervasive in many programming as well as scripting languages and as well in mainstream database products.

I really recommend you put in the time and effort to learn regular expressions, they are power tools that are going to open for you a whole new world of text processing possibilities.

Link:
http://immike.net/blog/2007/04/06/the-abso...ar-expressions/

Reply

develCuy
regexp in PHP Arrays:

Clear blanks:
CODE
$array = preg_grep('/[^$]/', $array);


Patterns for zip codes
CODE
$zip_code = str_replace(' ','','ZIP CODE');

    $pattern = array(
      array(
        '/^[[:alnum:]]{6,6}+$/',
        '/[[:alpha:]]/',
        '/[[:digit:]]/'
      ),
      array(
        '/^(\d){5,5}+$/'
      )
    );
        $is_zip_code = true
    for($_j = 0; $_j < count($pattern[$_i]); $_j++){
      $is_zip_code = ($is_zip_code and preg_match($pattern[$_i][$_j],$zip_code));
    }


Regexp have power to resume your code in rules, then you are able to change the pattern easily.
There are many tools to create regexp patterns.

Blessings!

 

 

 


Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. regex every programmer - 295.28 hr back. (1)
  2. regular expression every programmer should know - 353.85 hr back. (1)
Similar Topics

Keywords : absolute bare minimum programmer regular expressions

  1. About Programmer - (13)



Looking for absolute, bare, minimum, programmer, regular, expressions

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for absolute, bare, minimum, programmer, regular, expressions
advertisement




The Absolute Bare Minimum Every Programmer Should Know About Regular Expressions



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE