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 8934919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:53:00+00:00 2026-06-15T09:53:00+00:00

I move some rows from a table to another, and I need to modify

  • 0

I move some rows from a table to another, and I need to modify the content during the operation. The matching selection should only contains an index (numerical). It is usually at the beginning, but I added the class to be sure to match the good one in the whole row.

$linehtml.replace('/<td class="index">[0-9]+</td>/', '<td>foo</td>');

I tried with:

'/<td class="index">[0-9]+</td>/'

'<td class="index">/[0-9]+/</td>'

I should be ok according to http://regexpal.com/, but something looks wrong with the jquery regex.

Here is an example:

<td class="index">5</td> <td>11</td> <td>History</td> <td id="description_5">here is the description</td>

It should looks like that at the end:

<td>foo</td> <td>11</td> <td>History</td> <td id="description_5">here is the description</td>

Edit:

My aim is to move a row from a second table to a first one: http://jsfiddle.net/k53Pz/2/

Click on the “Click to add” cell (sorry it is in French, I created the Fiddle fast because I just started this workflow. Maybe it isn’t a good method to do it)

  • 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-15T09:53:00+00:00Added an answer on June 15, 2026 at 9:53 am

    JavaScript supports regexes as literals, so don’t quote them. e.g.

    s.replace(/<td class="index">[0-9]+<\/td>/, '<td>foo</td>');
    

    Keeping in mind that you need to escape your forward slashes and whatnot.

    By quoting them, you’re saying to treat it as a normal string, not a regular expression.

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

Sidebar

Related Questions

I need to move some selected items from a list by clicking on a
I am trying to insert some data from one table into another but I
I'm looking to move some of my lighter weight metaprogramming from Nemerle to Boo
I need to transfer a large number of rows from a SQL Server database
I have a list of rows from a dataset that I need to iterate
Possible Duplicate: Get script of SQL Server data I want to move some rows
I'm trying to move a database table to another server; the complication is that
I have some troubles trying to move data from SQL Server 2000 (SP4) to
I have a UITableView with some sections and rows. I want to move one
I'm trying to perform some upgrade maintenance on our database. I need to move

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.