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

Browse by Tags

All Tags » html
Showing page 1 of 5 (48 total posts)
  • 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
  • Removing line breaks between <a> HTML tags

    I'm in perl, trying to write a regex that will remove line breaks from between <a> tags, so that a later regex can extract data from links, for example my current data looks like this: <a href='http://www.website.com' class='blah'>This is a website</a> And want to turn it into: <a ...
    Posted to Construction Advice (Forum) by Rohaq on March 23, 2010
  • Problem filtering HTML with a negative lookahead construct

    Hi, I have hundreds of links on a website that were manually programmed in HTML as hyperlinks. Our designer informed me that they shouldn't be links, so rather than line by line remove the <A> element from my code I'm looking to use the Regular Expression search and replace function within my development IDE to resolve this issue ...
    Posted to Construction Advice (Forum) by Integralist on September 28, 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
  • How to get the html comment at the end of the string (if there is any)

    Hi, I have for example the following string: <!-- google_ad_section_start -->Some text bla bla!<!-- google_ad_section_end --> Now I need a regex to only find the last comment, but only if the string ends with a comment (maybe followed by some white spaces). If there is somebody asking for the sense of this, I need to add a read more ...
    Posted to Construction Advice (Forum) by ositoblanco on July 1, 2009
  • Get data between HTML tags [VB.NET 2008]

    Hi, im new to regular expressions, and have a questions. How do i go about getting data between HTML tags ? eg:   <pos>1234.000 2345.000 567.000</pos>   I've tried both of these: ^\Q<b>\E[\d\w\s]+\Q</b>\E and  (?>=^|>)[^><]+?(?=<|$) , But neither of them work how i need them to. The ...
    Posted to Construction Advice (Forum) by ChrisYuki on May 24, 2009
  • Regular expression to match XHTML tags that aren't closed properly

    Hello! I'm using PHP and I need to find all the XHTML tags that aren't closed (or open) properly in a text. For example, in this text I need to match the tag <strong> to remove it: <p>This is an <strong>error</p> I thought it would be easy, just an assertion-related problem, and I created this ...
    Posted to Construction Advice (Forum) by Sanva on December 24, 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
  • Extracting data from HTML table, solving greediness problem

    I hoped that the answer to my last question would be enough of a hint to solve the following problem but I still don't get it how to negate a part of the expression or maybe there is a better solution... Still using PCRE in PHP. I'm parsing an html document. My goal is to extract some data from a table that meets certain conditions: - id ...
    Posted to Construction Advice (Forum) by schnizZzla on October 6, 2008
1 2 3 4 5 Next >