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 12 (115 total posts)
  • Syllables in PHP (English)

    Howdy, I would like to implement a regex of the rules found here for showing a word in its syllables http://www.phonicsontheweb.com/syllables.php  So far, I've got: //lowercases the word, taking out anything other than letters $word = preg_replace('/[^a-z]/is', '', strtolower($word)); //split at: vowels, double ...
    Posted to Construction Advice (Forum) by jordan_6flex on January 26, 2010
  • weird linebreak problem in php preg_replace

    what i'm trying to do is remove all line breaks in and around certain html (or xml if you will) elements (h[0-9], ul, li) from a string the following works fine for removing leading and trailing line breaks, but not the ones inside the element: $text = ...
    Posted to Construction Advice (Forum) by blarg on January 12, 2010
  • regexp to replace the number by the characters

    hi I have a string like this: Code: $ maCahine = (1 and 2 or 3) I have a php regexp: Code:  $ reg = "# (\ () (0,1) \ s * $ number \ s * (and | or | \)) # i to replace the number by string has provided the number preceded by "(" and follow either by AND or OR or "). then I use php preg_replace function to replace. but I ...
    Posted to Construction Advice (Forum) by devMan on December 24, 2009
  • mod_rewrite invents "php"

    Hello,   We tried to figure that out, but we could not find a solution yet. So please give us some kind of advice.   These are the essential lines: RewriteRule ([a-zA-Z0-9]+)/([a-zA-Z0-9]+)\.html$ index.php?tp=$1&up=$2 [L] RewriteRule ([a-zA-Z0-9]+)/$ index.php?tp=$1 [L] RewriteRule ([a-zA-Z0-9]+)$ index.php?tp=$1 [L] ...
    Posted to Construction Advice (Forum) by Realspace on October 29, 2009
  • REG_BADRPT when i'm trying to test a regex with ereg (POSIX)

    Hello everyone, I'm pretty new to regexes and I've got a small problem. I have the following regex: (?<=lblVacant">(ab )?)([\d,.\/]+)(?=(<\/span>|\s\-)) which should match ose1_DetailEstateData1_lblVacant">06.08.2009 - 30.10.2009</span></td> ailEstateData1_lblVacant">10.08.2009 - ...
    Posted to Construction Advice (Forum) by Olty on August 6, 2009
  • find if either stringa or stringb do not exist in a string

    I am working on making a bbcode system with php using preg_replace(), and I am making it so that other tags will not work inside of a code block. This is the code I am currently using, it almost works: /(?!\[code\])(.*)(\[b\])(.+)(\[\/b\])(.*)(?<!\[\/code\])/Usi  what I want it to do is if [*code] and [*/code] are around the text inside, ...
    Posted to Construction Advice (Forum) by sarathi on July 31, 2009
  • PHP regex

    I need help with a regular expression in PHP, I have made a small forum, and I am adding features, up until now whenever someone types a url "http://..........." I use a regex to make a link, but now I have new features, one of them is adding youtube videos, to do this I ask my members to simply type youtube(youtube_url) the problem is ...
    Posted to Construction Advice (Forum) by djp1@ymail.com on July 25, 2009
  • Replace matches in HTML

    I'm trying to find words in HTML that are between tags using PHP (v5.2.6) preg_replace. The following rules apply to the matches full word match only (can also be matched when adjacent to non-word characters such as commas, parenthesis, periods, question marks, exclamation marks, percentage, dollar signs) e.g. "test" would ...
    Posted to Construction Advice (Forum) by mrboskits on July 16, 2009
  • text format

    Hello. I have a text like this :  Lorem Ipsum is simply dummy text of the printing and typesetting industry. {onpage} {    more}Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.{end} It has ...
    Posted to Construction Advice (Forum) by mirceasoaica on July 1, 2009
  • Php preg match all problem

    Hi,  This is my first post and for sure not the last one ! Hope i can finnaly understand more about regular expression because for now i am far away to understand everyting ! Ok lest start with my problem description : i am trying to get the last video from youtube page.  Here my patern that i use : @<a ...
    Posted to Construction Advice (Forum) by keny on June 19, 2009
1 2 3 4 5 Next > ... Last ยป