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

  • SEARCH
  • Home
  • 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 6764917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:39:02+00:00 2026-05-26T14:39:02+00:00

This is related to a previous question I asked with Jquery. If I have

  • 0

This is related to a previous question I asked with Jquery. If I have multiple tables throughout a webpage as shown below. Is it possible to find the name after Edited by: and replace it with something else. The name will always be different and replaced with “anon”. The suggested example I’ve been using is from my previous question works perfectly but in there I know the class and ID of my div, How would I do it with contents within the table element?

Many thanks

<script type="text/javascript">
$(document).ready(function() {
    $('div.blogEntries div.entry span').remove();

    $('.entryFooter').each(function() { 
        var html_arr = $(this).html().split(' '); 
       html_arr[2] = 'anonymous'; 
       $(this).html(html_arr.join(' ')); 
    });
});
</script>

<table border="0">
    <tbody style="border-radius: 8px 8px 8px 8px;">
    <tr>
        <td>
            An example post
            <br>
            Edited by: joe at 03/11/2011 14:09
            <br>
            <br>
        </td>
    </tr>
    </tbody>
</table>
  • 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-05-26T14:39:03+00:00Added an answer on May 26, 2026 at 2:39 pm

    You can use regular expression to replace html:

    var replacementRegexp = /(.*Edited by:\s+)(.+)(\s+at.*)/m;
    
    $("table td:contains('Edited by')").each(
    
    function(index, element) {
        $(element).html($(element).html().replace(replacementRegexp, '$1anon$3'));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a related to a previous question I have asked here, see the
This is closely related to a previous question i asked. I have a many-to-many
This is related to my previous question , but a different one. I have
This question is related to my previous question . The storyline: I have an
This question is related to a previous question I asked, but it's a different.
This question is directly related to my previous question ASP.NET AJAX Is it possible
This is related to my previous question , but it seems I have another
This is kind of related to my previous question, but not really. I have
I asked this question earlier: mod_rewrite: match only if no previous rules have matched?
I have a question related to this previous question of mine . In an

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.