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 » tags
  • Masking email tags

    Hi, im trying to mask all html "a" tags in php using preg_replace_callback what contains a valid email address in href attribute, "mailto:" would be optional. a-tags can have any possible syntax, so im trying to match all [ \t\r\n\v] and chars between <a........href and after".........>, i assume i have ...
    Posted to Construction Advice (Forum) by BringerOfTheDawn on May 8, 2011
  • Capturing tags and attributes to reconstruct html

    Hi there, I like to have a named capture regular expression who captures the following from a html string: some_tag, could by p div span, (?P<container_start>..... the total class attribute cont_p_img_left, right or center and not other classes, (?P<container_class>..... the last part of the class attribute, ...
    Posted to Construction Advice (Forum) by pietjepel on April 30, 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
  • tags in tags [bla bla[bla]bla bla]

    hi all, i need some regex to get over this situation. i couldnt figure it out myself so if you can help me, that would be great. my problem is that i need to extract some tags. for example; bla bla bla {{ tag starts here {{ internal tag }} and it continues.. }} like this.. I need to extract : {{ tag starts here {{ internal tag }} and it ...
    Posted to Construction Advice (Forum) by tpaksu on April 9, 2008
  • Avoiding string conversion in H2 tags

    Hi, I'm using a PHP script to convert certain strings (for example "ski holiday") to links. The problem is that the strings are also converted if they appear in subheaders (<H2>, example). I only want them converted if they appear in normal text (<P>). The script I use (SH Autolink for WordPress) contain the regular ...
    Posted to Construction Advice (Forum) by sethson on March 1, 2008