Lines Matching full:foo*

489     $pattern = "foobar";
494 $pattern = "(?i)foobar";
537 A zero-width negative look-ahead assertion. For example C</foo(?!bar)/>
538 matches any occurrence of "foo" that isn't followed by "bar". Note
542 If you are looking for a "bar" that isn't preceded by a "foo", C</(?!foo)bar/>
543 will not do what you want. That's because the C<(?!foo)> is just saying that
544 the next thing cannot be "foo"--and it's not, it's a "bar", so "foobar" will
545 match. You would have to do something like C</(?!foo)...bar/> for that. We
547 before it. You could cover that this way: C</(?:(?!foo)...|^.{0,2})bar/>.
550 if (/bar/ && $` !~ /foo$/)
562 A zero-width negative look-behind assertion. For example C</(?<!bar)foo/>
563 matches any occurrence of "foo" that does not follow "bar". Works
803 word following "foo" in the string "Food is on the foo table.":
805 $_ = "Food is on the foo table.";
806 if ( /\b(foo)\s+(\w+)/i ) {
810 When the match runs, the first part of the regular expression (C<\b(foo)>)
812 $1 with "Foo". However, as soon as the matching engine sees that there's
813 no whitespace following the "Foo" that it had saved in $1, it realizes its
816 of "foo". The complete regular expression matches this time, and you get
817 the expected output of "table follows foo."
820 everything between "foo" and "bar". Initially, you write something
823 $_ = "The food is under the bar in the barn.";
824 if ( /foo(.*)bar/ ) {
833 I<first> "foo" and the I<last> "bar". Here it's more effective
834 to use minimal matching to make sure you get the text between a "foo"
837 if ( /foo(.*?)bar/ ) { print "got <$1>\n" }
1047 example: when matching C<foo|foot> against "barefoot", only the "foo"
1102 'foo' =~ m{ ( o? )* }x;
1104 The C<o?> can match at the beginning of C<'foo'>, and since the position
1109 @matches = ( 'foo' =~ m{ o? }xg );
1113 print "match: <$&>\n" while 'foo' =~ m{ o? }xg;