unusual regex expression

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Wed Oct 03, 2012 8:44 am

i usually have a hard time with regex, but this one looks straightforward. (.*) says to capture all sequential iteration of a pattern, in this case no pattern is specified so it will return everything. (:) means to capture just that character, and then back to another (.*). i believe that the pattern you've listed would return the same result as a single (.*)

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests