cory_r — 2012-02-24T18:45:38-05:00 — #1
What's the RegEx for this?
paul_wilkins — 2012-02-25T06:48:14-05:00 — #2
What are you intending to match?
cory_r — 2012-02-25T22:10:31-05:00 — #3
I need to match the aforementioned text so I can remove it with jQuery. Here's what I have:
$('#stats td:contains(Total Forum Posts)').html($('#stats td:contains(Total Forum Posts)').html().replace(/Total Forum Posts:/gi,''));
I just need the RegEx to match any number in that thousand, since the match never stays the same as posts increase.
parkint — 2012-02-25T22:18:55-05:00 — #4
will remove all digits. But, if you expect a comma and/or dot (for decimal) you should use
But, since you have access to the TD that "contains" this text, can't you simply replace the entire contents of that cell? That would avoid the complexity (and the necessity) of a RegExp.
paul_wilkins — 2012-02-26T00:53:29-05:00 — #5
Which forum software are you using, in case there's a built-in way to do the same thing?
cory_r — 2012-02-27T09:08:23-05:00 — #6
$('#stats td:contains(Total Forum Posts)').html($('#stats td:contains(Total Forum Posts)').html().replace(/Total Forum Posts: [0-9,.]*/g, '');
I ran that in Firebug and I get this: http://prntscr.com/6ivs0
I'm not sure how you would replace the entire contents of a cell with jQuery while keeping the statistics still in check.
I'm using ZetaBoards and it does not have the option to remove individual lines from the board statistics.
paul_wilkins — 2012-02-27T15:28:07-05:00 — #7
There's a mod that removes the board total number of members count - http://resources.zetaboards.com/topic/500148/1/
It's likely then that there is also a mod that removes the total form posts count too.
Oh look, perhaps this one. Remove post count - http://resources.zetaboards.com/topic/5079033/1/
cory_r — 2012-02-27T20:20:53-05:00 — #8
The first link links to an InvisonFree code. InvisonFree and Zetaboards are on the same network, but they are two different software's.
The second link links to a code that removes post count in the user details in posts, not the statistics.
paul_wilkins — 2012-02-27T20:23:21-05:00 — #9
This is the first that I've heard of or dealt with zetaboard here. I think that you may be better served by posting your query in the forum that is dedicated to zetaboard matters. That way you will have access to people with a great depth of knowledge in zetaboard matters.
paul_wilkins — 2012-02-27T21:58:02-05:00 — #10