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

Browse by Tags

All Tags » 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 @dd.ee".........>, 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
  • fetching attributes

    Hello, I'm looking for a pattern that extracts the attributes inside an html element string I came up with the following: /<font\s[^>]*face="(.*?)" size="(.*?)" color="(.*?)"[^>]*>(.*?)<\/font>/si  but what if not all 3 attributes face, font and size are required? is it possible to ...
    Posted to Construction Advice (Forum) by iCon on July 11, 2010
  • <font> to <span>

    I want to change a font element to an XHTML compatible variant. e.g. find <font face="arial" size="1" color="red" >hello world</font> replace <span style='font-family: arial; font-size: 1; color: red;'>hello world</span>   note: - the font attributes can change order - ...
    Posted to Construction Advice (Forum) by iCon on July 8, 2010
  • 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
  • Elimination of <span style> tags inside a <span class> tag

    my variable is like this:$var='<td><span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style='direction: ltr; text-align: left'><span style='font-weight: bold; font-style: italic;'><span style='text-decoration: ...
    Posted to Construction Advice (Forum) by revbackup on June 18, 2009
  • How to find text between only one XML tags

    Second day trying to resolve the problem.I need to find text between second tags "value". It could be different. The text between first tags "value" is constant. There is possible to use only regular expressions. No any programm tecknics. I can find text 'first' and 'second'. But only 'second' - I cant. ...
    Posted to Construction Advice (Forum) by maximus on March 15, 2009
  • VBScript RexExp Replace a textstring only if not within tags <></>, possible?

    Hi, i got a dillema... for a company i need to make every occurence of it's company name to be in red and bold font. i have writen a simple function that i can call and filter all text database records Function companyName(inputText)  If inputText<>"" Then   companyName= ...
    Posted to Construction Advice (Forum) by RvdH on June 28, 2008
  • 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