Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7841229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:03:29+00:00 2026-06-02T16:03:29+00:00

I have a huge WordPress XML export. Unfortunately, some bastard managed to inject code

  • 0

I have a huge WordPress XML export. Unfortunately, some bastard managed to inject code into the installation and injected DIVs into the content.
Now I want to clean that mess up. Here’s what it looks like:

<p>Normal Text</p>
<div style="position:absolute;top:-9660px;left:-4170px;"><a href="http://insane.link.com">Insane Linktext</a></div>
<div style="position:absolute;top:-2460px;left:-5370px;"><a href="http://insane.link.com">Another Insane Linktext</a></div>
<p>Normal good people's brains' text</p>

I thought about using some regex expression to match the DIVs containing a STYLE attribute. Available tools are Aptana or other TextEditors and a PHP Server as well as a OSX Terminal. Any Suggestions for this?

Thanks and Cheers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:03:31+00:00Added an answer on June 2, 2026 at 4:03 pm

    This might help you: It will match the divs that you provided above:

    <div style="[a-zA-Z0-9-:;]+"><a href="[a-z:/.]+">[a-zA-Z ]+</a></div>
    

    However, it will only match a div > a > text pattern and only divs that have a style attribute and nothing else.

    You should be able to do a find-and-replace using most HTML editors (Dreamweaver and Notepad++ both allow it)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a huge IQueryable that I want to export directly to Excel for
I have a huge application and at some point, when a redirect is involved
I have a huge XML file (114 KB/1719 lines; see the error message below
I have huge table with 1 million records, i would like to modify some
I have huge code base and I am having difficulty managing it. There are
I have huge number of Word files I need to merge (join) into one
I have some functions that have huge inputs (some of them has 28 etc),
We have huge stack of xml files (around 5000+ files) possibly about 80 MB
We have huge codebase and some classes are often used via reflection all over
I have a production app that tracks a product catalog. Some customers have huge

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.