SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Help with Regex

  1. #1
    SitePoint Addict
    Join Date
    Oct 2003
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with Regex

    There is some tags with missing quote.

    For example:

    <img src=file.jpg border="0" alt=text goes here title=this is a title />

    replace to:

    <img src="file.jpg" border="0" alt="text goes here" title="this is a title" />
    [Home Sweet Home]

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A robust solution for this isn't trivial, unless the html strictly follows the format you've provided. But I doubt it follows a format strictly, for obvious reasons

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •