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_replace » bbCode
  • preg_replace of http adresses

    hi im using PHP and i got this function in my forumsoftware:   function links($text, $conf) { $text = preg_replace("/(\s)http:\/\/([\S]+?)(\s)/i" , "$1http://$2$3" , " $text "); $text = ...
    Posted to Construction Advice (Forum) by hayopai on February 17, 2011
  • 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
  • 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