Resource icon

Post Content Find / Replace 1.0.0

No permission to download
I'm going to call out user error here or whatever this is... now that I have tested both your examples with the one expression/replacement and well...you can see for yourself.

dfgfdgd.webp
 
I'm going to call out user error here or whatever this is... now that I have tested both your examples with the one expression/replacement and well...you can see for yourself.
Thanks, appreciate the assistance.
What tool are you using for that testing? I cannot replicate ...

1/ Using https://xenforo.com/community/resources/post-content-find-replace.1549/ No matches found (after clicking Proceed) ...
Screen Shot 2016-04-07 at 07.35.25.webp

2/ Using http://regexr.com/ ...
Screen Shot 2016-04-07 at 07.51.07.webp

3/ Using http://www.regextester.com/ ...
Screen Shot 2016-04-07 at 07.53.20.webp
 
change the quick search (in post replacement tool) to youtube and see what it nets you, though you shouldn't need to do this...

dsafsdf.webp

Note that those regex testers you have shown seem to force different delimiters on you...with / being a delimiter all / characters will need to be escaped in that expression and it is why I use my own tool modeled after another site I saw back in the day because I have full control and write regex like I would in np++.
 
change the quick search (in post replacement tool) to youtube and see what it nets you, though you shouldn't need to do this...
Didn't help, unfortunately.
Your screenshot of this add-on is different than mine. I don't have either of the 'Quick Find ...' options, or the 'Edit Silently' option. Do these only appear when you have matching/results? Maybe I have a older version, and that is the reason for our differences?
Thanks.
 
The differences mean nothing, they are options I added to my own....the point is I tested the expression not only with a regex tester but by injecting the erroneous strings into my DB and then trying the post replacement on them the exact way I have shown you and it works so I have to guess it is something wrong on your server end...maybe your php is using a broken alternative PCRE library, either way the error is completely on your end and there is nothing I can do about it. Speak to the guy who manages your server.
 
My regex-fu isn't strong enough for this. How would I replace the following with the appropriate media BB code?

[youtube=vrCb_fNmSTA]The YouTube video's title[/youtube]

Also, after converting from vBulletin to XenForo some of the posts where people used alternate font colors and sizes have lines like this:

[FONT=Arial, Helvetica, sans-serif]So in future, be more careful!"[/FONT]

Can this add-on clean it up somehow?
 
[youtube=vrCb_fNmSTA]The YouTube video's title[/youtube]

Quick Find:
Code:
youtube

Regular expression:
Code:
#\[(youtube)=([a-z0-9-_]{11})](?:.*?(?!\[/\1]?)).(?:\[/\1])#siu

Replacement String:
Code:
[media=\1]\2[/media]



Also, after converting from vBulletin to XenForo some of the posts where people used alternate font colors and sizes have lines like this:

[FONT=Arial, Helvetica, sans-serif]So in future, be more careful!"[/FONT]

Can this add-on clean it up somehow?
Yes it can but clean up can mean different things depending on what exactly it is that you want to do with them.
 
Please any one can let me know, How to remove BB code tag from post ? not Replace.
To remove or to replace is generally the same thing when you actually apply the changes...to remove you are simply replacing something that exists, with nothing or blank space basically.

read: leave the replacement field blank
 
OMG, you converted your site to XF?

Yes, but does not know any knowledge about XF

To remove or to replace is generally the same thing when you actually apply the changes...to remove you are simply replacing something that exists, with nothing or blank space basically.

read: leave the replacement field blank

Not working for me, Is my BBcode tag [FONT=&amp] but after the run Post Content Replacement Tool then now its saved to []

Not removed full code [FONT=&amp]

ScreenShot00052.webp
 
[FONT=&amp] is not how to write a regular expression.

[ must be escaped and all regular expressions must start and end with a delimiter ( your [ and ] are being used as delimiters therefor they are not part of what is matched by the expression).

Did you save the changes or run the tool the first time with the box unchecked?

#\[FONT=&amp]#siu​
is how that regular expression should look.

- - - - - -
To remove all instances of []

quickfind: []
regular expression: #\[]#siu​
 
One more thing, how to remove from thread ID or post ID ? I have removed [FONT=&amp] 8700 post but now need to remove [/FONT], If i remove [/FONT] that will do remove 37500 post. Its will remove all [/FONT] where the code are still working.
 
You should not remove the opening tag before the closing tag in this case (the opening tag is the unique identifier in this case).

You need the opening [FONT=FONT-NAME] and the closing [/font] so that you can replace them all at once or alternatively remove the closing [/font] first leaving you with something you can safely target (the opening tag).

If fixing that is important to you, you pretty much have two choices at this point.
  1. You can reload the most recent backup of your board and start again observing a strategic order of operations.

    or

  2. You would need an expression that matched every [/font] that was not led by an instance of a variation of [FONT=Font-name] and was not part of a set of open and close tags and then replace that.

    The best way to do this is to test your expressions on a trial run of the import, work out your replacements and write them down, then do the actual live import and when that is complete run your list of replacements you took note of.

    If this is on your live board you might considering seeking assistance as this process is not usually something a person new to it will pick up quickly.
 
OK, I will now going to do with replace with (xenforo font name)

To remove all instances of [FONT=&amp]

quickfind: [FONT=&amp]
regular expression: #\[FONT=&amp]#siu
replace: [FONT=&arial]

Does this correct?
 
I need help to replace but does not know how to doing this ? Please any one can help me ?

showthread.php?619-অস্মিতের-সাথে-নীর্জনে-আড্ডা replace to index.php?threads/অস্মিতের-সাথে-নীর্জনে-আড্ডা.199
 
Very useful tool, and thanks for the modification @EQnoble

What would be useful though is the ability to save and run the save job as a scheduled cron job..

Would be particularity useful for removing Tapatalk signatures, without admin intervention
 
Top Bottom