Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

Browse by Tags

All Tags » preg_match_all
Showing page 1 of 2 (11 total posts)
  • parsing set of encoded file names

    Hi y'all! I'm very glad this forum exists as I'm not sure where else to turn with this question. I'm parsing the file name of a whole bunch of files in PHP using preg_match_all() and I want to recover 4 bits of information. The naming convention is: _tag_99_Nice_name.extension I need to break this down into 4 parts_tag_ : I ...
    Posted to Construction Advice (Forum) by CpILL on March 17, 2011
  • How to match same pattern existing inside pattern?

    I have this kind of strings:  {test1|test2|test3} This is easy to match with something like:  ~{(.*?)}~  But I would like to be able to match strings like: {test1|test2|test3{subtest1|subtest2}} or {test1|test2|test3{subtest1|subtest2{subsubtest1|subsubtest2|subsubtest3}}} I can't figure out how I could match that in the ...
    Posted to Construction Advice (Forum) by www on February 13, 2011
  • extracting valuable info from random text based on definition

    Hi, New question from me. It should have been easy but cannot figure it out. I have a random text with special definitions in it. I need to get information according to the following rules: - the important text is started with a [ followed by a keyword and a semicolon and zero or more whitespaces. The keyword is predefined. - the first word ...
    Posted to Construction Advice (Forum) by zorden on November 25, 2010
  • extracting sentences and uses from one message and compose new mails for all users with relevant sentences

    Hi, We have a control system, which sends automated messages in the following syntax:     ##TO admin, user1, user2 message1 ##TO user2, user4 message2 ##TO user5 message3   I think the syntax is obvious. From this message I need to create as many messages as many different users are after the ##TO fields. In this case ...
    Posted to Construction Advice (Forum) by zorden on October 26, 2010
  • Validating a Label

    Hi all! I'm starting to get my head around regular expressions for work, but there are still bits and pieces my mind just draws a blank with.. At the moment I'm trying to validate a text string to check if it has 5 specific values, and extract them, using PHP. Here are a few examples of valid labels [cake] cupcake 50kg $100 ...
    Posted to Construction Advice (Forum) by dmno on April 3, 2010
  • regex match

    Hi all,  i have a question about regex. How can i use php preg_match_all to match all stuff inside custom tags, including any new lines. the parsed text looks like this: [article] lorem ipsum dolor.. lorem ipsum dolor ... lorem ipsum dolor ...  [/article]  expresion used for ignoring only one new line ...
    Posted to Discussion (Forum) by w3bbuilder on October 29, 2008
  • Help on extract url and image

    Hello how's everyone doin'? I need help with the regular expression in PHP (using preg_match_all) that would extract the url and the image of these two: <A HREF="movie1.mpg"><img name="movie1" src="images/tn_01.jpg" width="320" height="240" border="0" alt="Play ...
    Posted to Construction Advice (Forum) by esthon_wood on June 25, 2008
  • Help on extract url and image

    Hello how's everyone doin'? I need help with the regular expression in PHP (using preg_match_all) that could extract the url and the image of these two: <A HREF="movie1.mpg"><img name="movie1" src="images/tn_01.jpg" width="320" height="240" border="0" alt="Play ...
    Posted to Construction Advice (Forum) by esthon_wood on June 25, 2008
  • Re: Regex for unknown number of lines - Assistance Request

    It's OK, I think I've found the answer to my own question. The # signs bracket the actual regular expression, and the e and the s are modifiers - e is equivalent to PREG_REPLACE_EVAL and  s is equivalent to PCRE_DOTALL. Maybe these are things which are so familiar to the experienced players that they almost go without saying, but ...
    Posted to Construction Advice (Forum) by mtgradwell on June 8, 2008
  • Re: Regex for unknown number of lines - Assistance Request

    I have a problem which seems similar to the one documented here, so I hope somebody reading this can help me too. I have a page of PHP code which works some of the time, but not always, so I'm trying to discover the bugs in it. It includes the line  preg_match_all('#<!-- start content -->(.*?)<!-- end content -->#es', ...
    Posted to Construction Advice (Forum) by mtgradwell on June 7, 2008
1 2 Next >