Due to vbulletin import many of my articles have a lot of extra enters in them. Often there are 5 line breaks where there only needs to be 1 or 2.
Is there any way to remove all empty rows / line breaks that are more than 2 empty rows?
Due to vbulletin import many of my articles have a lot of extra enters in them. Often there are 5 line breaks where there only needs to be 1 or 2.
Is there any way to remove all empty rows / line breaks that are more than 2 empty rows?
You can try using a regular expression in the mass replace tool.
Search: (\v{2})\v+
Replace: $1
- lead developer for VaultWiki
'Reviewing Prepared Results' displays all existing articles, while many do not include line breaks.
You always ask about that. That is working as intended.
Think about it this way: if your replacement includes find text, you have to check all articles for the find text. If your replacement does not include find text, you have to perform it on all articles anyway. You can reduce the number of articles to check by using other criteria.
Remember that a replacement is not the only action you might perform. For example, sometimes you might want to add text to the end of all articles.
Also remember that the content of articles is stored as binary data -- not as text, so we cannot use MySQL tests such as LIKE or REGEXP. We have to actually unpack the content of each article and try to perform the replacement individually.
As mentioned above, that is where the criteria comes into play. Since your criteria included all articles, all articles are listed. The replacement is not part of the criteria; it will be performed against the criteria results. You have to confirm whether you want to try on these articles.
- lead developer for VaultWiki
That worked great and saved me a ton of work. !
I would also like to remove all superfluous line breaks after a [/h]
i.e. turn this:
into this:Code:[h=2]some headline[/h] Text with superfluous line break
Is this possible?Code:[h=2]some headline[/h] Text with superfluous line break
Generally, this is what you would do.
Find (regex):
Replace:Code:\[/h\]\v{2,}
But I don't recommend this variation, as I believe you would end up with \n literals in your content. We will have to improve support for these kinds of replacements.Code:[/h]\n
Instead, this will more likely have the results you desire:
Replace:Code:\[/h\](\v)\v+
Code:[/h]$1
- lead developer for VaultWiki
Is there a way to make it do more pages at a time?
It will do up to 200 pages per browser refresh. It may do as few as 1 per refresh depending on the processing times of the individual pages. Once it reaches 10 seconds, it will refresh before doing the next item in the queue. There is little benefit to increasing the number of pages done per browser refresh.
- lead developer for VaultWiki
After it has completed, not all pages have been processed. So I keep repeating the action until its done, but my CTS flares up from the repetition.
Why do you think that not all pages were processed?
- lead developer for VaultWiki
For example if I remove a specific bbcode that is used in a lot of pages, then its still in some pages. Or when I replace (\v{2})\v+ with $1 then it doesn't remove all the double line breaks from all articles.
(\v{2})\v+ => $1
will replace 3+ line breaks with a double line break.
Example:
BecomesCode:text more text
It will also not work if one of the lines has a space or something like that.Code:text more text
- lead developer for VaultWiki
I see. That could explain it.
Bookmarks