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
Showing page 1 of 10 (96 total posts)
  • PHP scrape and regex problems ... how to exclude?

    Got a problem ... I've got a php-script that scrapes a schedule system for a school ... The output/feed will be displayed as a ticker (Jticker) at the bottom of information monitors around the buildings. The scrape works just fine and the feed as well, I've even managed to modify it so that it passes with no-errors at feedvalidator.org ...
    Posted to Construction Advice (Forum) by Tomas Johansson on November 28, 2008
  • PHP: preg_match_all on Anchor Tags with href, Title and InnerHTML

    In PHP using preg_match_all; I need to extract all anchor tags with array with href, title and innerHTML. <a href="http://mydomain.com/" title="My Title">My InnerHTML</a> <a href="http://mydomain.com/">My InnerHTML</a> <a href="http://mydomain.com/" title="My ...
    Posted to Construction Advice (Forum) by jflesher on November 17, 2008
  • PHP: Variable Matches

    I am attempting to write a regular expression in PHP to tear out a bunch of "modes" from a string. For example, the string "'%CFlR9Bf9Q104;test'" should find the following modes: C, F, I, R9, Bf9, Q104 Using the following regexp with preg_match(): '/^%(([A-Z][a-z0-9]*)*);(\w+)$/' However, it produces the ...
    Posted to Construction Advice (Forum) by Clodaus on November 16, 2008
  • [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
  • regular expression to replace the given instance of word in a text

    Hi, Anybody knows how to replace the second or third instance of word in a text using regular expression in php (preg_replace()) For example, I have an article about car and let's say the word car occurs 10 times. Now I want to replace the 3rd and 7th instance of car with some other word. How can I do this with php regular ...
    Posted to Discussion (Forum) by namus25 on November 5, 2008
  • PHP eregi() time format validation (hh.mm)

    Hello, I am currently adapting the great supercali event calendar to my needs. For german readers I'd like to use the common time format  hh.mm The input field containing the time value is checked as follows:    if(($time_lang_mode == "en_us"     && eregi ...
    Posted to Construction Advice (Forum) by pexxll on September 9, 2008
  • [quote] forum's tags stripping recursively

    Hello All. you know there are many forums using a quote bb code like this [q uote] some quote [/q uote] I know how to match it but the problem is it can be nested and I do not know how to match it recursively. some text [q uote] some quote [q uote] some nested quote [/q uote] some [q uote] some nested quote [/q uote] quote [/q uote] some ...
    Posted to Construction Advice (Forum) by imei on September 7, 2008
  • only the word coming after a value (PHP)

    Hi, I am learning regex nowadays. Now, i am stuck because i cant find how to do it anywhere. I need to retrieve a word coming after a value. For example, i need to retrieve the value of the PPFT below: <input type="hidden" name="PPFT" id="i0327" ...
    Posted to Construction Advice (Forum) by sayim on August 24, 2008
  • BBCode conversion

    Hi, I asking for help in my PHP code optimization. I try to rewrite my old/slow BBCode conversion function to use regex. The allowed BBCodes are [ b]text[ /b] [ i]text[ /i] [ url]domain.com[ /url] or [ url]domain.com|domainname[ /url] [ img]filename.ext[ /img] or [ img]filename.ext|description[ /img] It is possible to construct ...
    Posted to Construction Advice (Forum) by pandor on August 23, 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
1 2 3 4 5 Next > ... Last ยป