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

Browse by Tags

All Tags » php regular exp... » php
Showing page 1 of 2 (11 total posts)
  • [PHP] Regex to paste templates

    Hello RegexAdvice users. I am at this time trying to update my template system, and i have desidet to use regex insted of ALOT of explodes :D I this i will start out with showing you what my templates look like. code:<html> <head> <title>Some test</title> </head> <body>    <php:if ...
    Posted to Construction Advice (Forum) by doomstone on November 6, 2008
  • Uncommon URL pattern retrieval

    Hi, Anybody out there, I'd be immensly greatful if you helped me fix one regular expressions of mine. Basically I've written a regular expression in PHP identifying a pattern of a certain type of URL REGEX: /(http\:\/\/dx\.doi\.org\/.*?)(\s|$|;|>)/ it will catch strings of URLs from the 'http://dx.doi.org/' domain, looking ...
    Posted to Construction Advice (Forum) by ksyandagger on August 19, 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
  • Problem with negative lookbehind in PHP PCRE Library.

    I have the following regex statement I'm trying to run in PHP.  (?<!(end\s?zone|lower|upper)\s?)(view)  Testing against the following string: (matches in bold) "The endzone view goes hi upper view and he goes view and then goes view and view and view!!!" Notice "upper view" and "endzone view" are ...
    Posted to Construction Advice (Forum) by simshaun on May 6, 2008
  • pulling specific variable from querystring URL

    Hi, I am using PHP5 on a XAMP installation. I am trying to extract a specific variable from a querystring (which is stored in my MySQL DB) The format of the string is always consists of the same parameters (p, x & y), however sometimes they could be in a different order. A sample querysting is below and I am ...
    Posted to Construction Advice (Forum) by sanmi on February 12, 2008
  • Ascending numbers with specific separators

    Hello all, I'd like to check on a php page that a text string complies with the following rule : Contain numbers,  in ascending order, with only   ,    or    -     as separators The numbers represent requested items (like pages to print), my purpose is then to count the ...
    Posted to Construction Advice (Forum) by ldauphin on February 8, 2008
  • RegEx PHP difficulties

    Hi! The given construction checks strings in the following format for a validation process of a user input. AB 123 YZZ-4 CD 123 OP-4 LUA EF 321 OP-4 RegEx: ^(?:AB|CD|EF)\s\d{1,3}(?:(\s[A-Z]{1,4}-?\d{1,3}?\s?[A-Z]{0,4})|-\d{1,2}) I checked it with the Expresso 3.0 regex software - working fine. When I insert it into my PHP script ( ...
    Posted to Construction Advice (Forum) by Andre on August 19, 2007
  • Find first previous string NOT all previous occurances

    In the following string: <div class="x" bla bla bla <div class="x" bla bla bla <div class="x" bla bla bla EXAMPLE STRING  I want to match: <div class="x" bla bla bla EXAMPLE STRING NOT <div class="x" bla bla bla <div class="x" bla bla bla <div ...
    Posted to Construction Advice (Forum) by LarryEitel on June 9, 2007
  • non-matches in matching group

    I'm currently working for a php tool, and I need to capture some element like I'd do with (.+?) but I need it not to contain an 'a' preceded by a whitespace, basically not containing (\sa), is there some way to do this? Mind you, it should work for a\s, \s[^a]a and such other options. If an input like "xyz a ajkl" is ...
    Posted to Construction Advice (Forum) by Madness on February 5, 2007
1 2 Next >