Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15544

Re: Regular expression for search first substring

From Norman Peelman <npeelman@cfl.rr.com>
Newsgroups comp.lang.php
Subject Re: Regular expression for search first substring
Date 2015-06-28 07:45 -0400
Organization A noiseless patient Spider
Message-ID <mmomm3$gm4$1@dont-email.me> (permalink)
References <8396c942-b581-4721-9e54-db20a947d652@googlegroups.com>

Show all headers | View raw


On 06/27/2015 12:53 PM, Juan Garcia wrote:
> Hi all,
>
> this is a dumb question for any PHP developer, but i and regular expression not have feeling :)
>
> Situation is string:
>
> The boy love movies [any variable string] and sport but sport is more important.
>
> I would like to search string "love movies...and sport" but regular expression i have return "love movies...and sport but sport".
>
> Which is the correct regular expression for this?
>
> Thanks all!
>
> Sorry for my english.
>

   You should supply the regex you are currently working with so that 
others can help you better. You don't really say exactly what you are 
after but this may get you started:

(love movies)(.+)(and sport)

love movies [any variable string] and sport

-- 
Norman
Registered Linux user #461062
-Have you been to www.php.net yet?-

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Regular expression for search first substring Juan Garcia <hotmaildeme@gmail.com> - 2015-06-27 09:53 -0700
  Re: Regular expression for search first substring Norman Peelman <npeelman@cfl.rr.com> - 2015-06-28 07:45 -0400
    Re: Regular expression for search first substring Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-29 00:02 +0200

csiph-web