Web Design Tutorials and Articles

Wednesday, April 8, 2009

Regex SubPattern in PHP

PHP Regular Expressions – Part IV Introduction In this part of the series, I explain regex Grouping (subpattern) and Capturing in PHP. Groupings We can use parenthesis to group characters in a pattern. Consider the following pattern: /The (guitarist)/ “guitarist” is in parenthesis. The parentheses form a group or subpattern, which has the text: “guitarist”. Consider the following: /The (guitarist is good)/ “guitarist is good” is in parenthesis. The parentheses form a group, which has the text:... Sign in to see full entry.

More Regular Expression Patterns in PHP

PHP Regular Expressions – Part III Introduction In this part of the series, we continue to analyze patterns in PHP Regular Expressions. Matching Repetitions In the subject string, characters or groups of characters may repeat themselves. We shall talk about groups of characters, as a topic, later. For now, let us concentrate on single character repeating itself. There are quantifier metacharacters that allow us to match repetition of single characters or groups of characters in the subject... Sign in to see full entry.

Regular Expression Patterns in PHP

PHP Regular Expressions – Part II Introduction In this part of the series, we start analyzing patterns in PHP Regular Expressions. Character Classes The Square Brackets A character class allows a set of possible characters, where one of them would match at a particular point, a character, in the subject string. Character classes are denoted by brackets [...], with the set (class) of characters to be possibly matched inside. Here are some examples: Let your subject string be “He has a cat.” You... Sign in to see full entry.

PHP Regular Expressions

PHP Regular Expressions – Part I 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 PHP 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. Handling this in code... Sign in to see full entry.

Strings and the JavaScript Eval Function

Mastering the JavaScript eval Function – Part III Introduction This is the third last part of the series, Mastering the JavaScript eval Function. In this part of the series, we see how a string can be used as argument to the eval function. String Literal in Argument Can a string literal be used as argument to the eval() function, in the ordinary sense? The answer is No. Execution of the following script stops at the line of the eval function: <script type="text/javascript"> myVar = eval("one");... Sign in to see full entry.

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

Headlines (What is this?)

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