Couldn't understand A (PCRE_ANCHORED)

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
nwp
Forum Contributor
Posts: 105
Joined: Sun Feb 04, 2007 12:25 pm

Couldn't understand A (PCRE_ANCHORED)

Post by nwp »

I couldn't understand the following from http://in.php.net/manual/en/reference.p ... ifiers.php
http://in.php.net/manual/en/reference.pcre.pattern.modifiers.php wrote:A (PCRE_ANCHORED)
If this modifier is set, the pattern is forced to be "anchored", that is, it is constrained to match only at the start of the string which is being searched (the "subject string"). This effect can also be achieved by appropriate constructs in the pattern itself, which is the only way to do it in Perl.
Can anybody provide some examples ??
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

There are lots of examples posted on the forums here. Most often, they involve the "^" character (not inside a character class)
nwp
Forum Contributor
Posts: 105
Joined: Sun Feb 04, 2007 12:25 pm

Post by nwp »

I really didn't find one.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Keep looking. You have examples in your own threads.
Post Reply