Web Design Tutorials and Articles

Wednesday, April 8, 2009

Regular Expressions in Perl for the Novice

Regular Expressions in Perl for the Novice – Part 1 Introduction Consider the string, “This is a man”. Assume that you do not know the content of the string; the string might have been typed by the user and the Perl code has assigned it to a variable. You may have the following two questions: 1) Does the sting have the word, “man”? 2) If the string has the word, “man”, can you change it to “woman”. There are many other questions that are similar (and rather complex) to the above two questions.... Sign in to see full entry.

Extra Features in PHP Regular Expressions

PHP Regular Expressions – Part VIII Introduction We have learned a lot about regular expressions in PHP. What we have learned would solve many of our problems. However, there will come a time when you would want to do more in regex. So this last part of the series is to add to what we have learned and introduce you to extra features in PHP. I intend to write articles on these extra features. Internal Option Setting You can embed modifiers in the regex (in the pattern). I will use the case-less... Sign in to see full entry.

Using Regular Expressions in PHP

PHP Regular Expressions – Part VII Introduction We have seen some uses of regex in PHP. We know how to verify if a regex is found in a subject string. We know how to find the position of matched regex in the subject string. Note that the subject string can be a whole page of text. In this part of the series, we shall learn two important features titled “Search and Replace” and “The Split Operation”. Before we leave this part we shall talk about the regex delimiter. Let us start with a very small... Sign in to see full entry.

Building a Regular Expression in PHP

PHP Regular Expressions – Part VI Introduction Many of the examples we have come across are simple examples. In this section we look at two examples that are more demanding. Before we leave this part of the series, we shall talk about what is called Backtracking. Steps required to Build a Regex These are the steps required to build a regex: - Specify the task in detail, - Break down the problem into smaller parts, - Translate the small parts into regexes, - Combine the regexes, - Optimize the... Sign in to see full entry.

Regex Modifiers in PHP

PHP Regular Expressions – Part V Introduction Matching is case sensitive. You may not know if what you are looking for is in lower case or upper case or has mixed cases. It is possible for you to make a case insensitive match. You need what is called a modifier for this. There are a good number of modifiers and each has its own purpose. We shall learn some of them in this part of the series. The i Modifier By default, matching is case sensitive. To make it case insensitive, you have to use what... Sign in to see full entry.

Page: << First  < Previous  .. 11  12  13  14  15  16  17  18  19  20 ..  Next > Last >> 

Headlines (What is this?)

Referrals - About Us - Press - Terms of Use - Privacy Policy - Conduct Policy
Copyright © 2017 Shaycom Corporation. All rights reserved.