• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Forum
    • VaultWiki How-Tos
    • VaultWiki Questions
    • Is there a way to mass remove superfluous enters from articles?

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Results 1 to 13 of 13

    Thread: Is there a way to mass remove superfluous enters from articles?

    • Thread Tools
      • Show Printable Version
    1. January 1, 2019 #1
      Alfa1
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Alfa1 is offline
      Distinguished Member
      Join Date
      September 26, 2007
      Posts
      597
      Rep Power
      285

      Is there a way to mass remove superfluous enters from articles?

      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?
      Reply With Quote Reply With Quote

    2. January 1, 2019 #2
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      You can try using a regular expression in the mass replace tool.

      Search: (\v{2})\v+
      Replace: $1
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    3. January 1, 2019 #3
      Alfa1
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Alfa1 is offline
      Distinguished Member
      Join Date
      September 26, 2007
      Posts
      597
      Rep Power
      285
      'Reviewing Prepared Results' displays all existing articles, while many do not include line breaks.
      Reply With Quote Reply With Quote

    4. January 1, 2019 #4
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      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
      Reply With Quote Reply With Quote

    5. April 22, 2019 #5
      Alfa1
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Alfa1 is offline
      Distinguished Member
      Join Date
      September 26, 2007
      Posts
      597
      Rep Power
      285
      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:
      Code:
      [h=2]some headline[/h]
      
      Text with superfluous line break
      into this:
      Code:
      [h=2]some headline[/h]
      Text with superfluous line break
      Is this possible?
      Reply With Quote Reply With Quote

    6. April 22, 2019 #6
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      Generally, this is what you would do.
      Find (regex):
      Code:
      \[/h\]\v{2,}
      Replace:
      Code:
      [/h]\n
      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.

      Instead, this will more likely have the results you desire:
      Code:
      \[/h\](\v)\v+
      Replace:
      Code:
      [/h]$1
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    7. April 22, 2019 #7
      Alfa1
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Alfa1 is offline
      Distinguished Member
      Join Date
      September 26, 2007
      Posts
      597
      Rep Power
      285
      Is there a way to make it do more pages at a time?
      Reply With Quote Reply With Quote

    8. April 23, 2019 #8
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      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
      Reply With Quote Reply With Quote

    9. April 23, 2019 #9
      Alfa1
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Alfa1 is offline
      Distinguished Member
      Join Date
      September 26, 2007
      Posts
      597
      Rep Power
      285
      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.
      Reply With Quote Reply With Quote

    10. April 23, 2019 #10
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      Why do you think that not all pages were processed?
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    11. April 23, 2019 #11
      Alfa1
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Alfa1 is offline
      Distinguished Member
      Join Date
      September 26, 2007
      Posts
      597
      Rep Power
      285
      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.
      Reply With Quote Reply With Quote

    12. April 23, 2019 #12
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      (\v{2})\v+ => $1
      will replace 3+ line breaks with a double line break.

      Example:
      Code:
      text
      
      
      
      more text
      Becomes
      Code:
      text
      
      more text
      It will also not work if one of the lines has a space or something like that.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    13. April 23, 2019 #13
      Alfa1
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      Alfa1 is offline
      Distinguished Member
      Join Date
      September 26, 2007
      Posts
      597
      Rep Power
      285
      I see. That could explain it.
      Reply With Quote Reply With Quote

    Similar Threads

    1. Is there a way to mass search and replace bbcodes in VW4?
      By Alfa1 in forum VaultWiki Questions
      Replies: 6
      Last Post: April 4, 2017, 2:49 PM
    2. Mass Import and Overwrite Pages?
      By SurferJon in forum VaultWiki Questions
      Replies: 6
      Last Post: January 22, 2017, 11:09 PM
    3. Mass Search/Replace
      By SurferJon in forum VaultWiki Questions
      Replies: 1
      Last Post: January 22, 2017, 10:30 AM
    4. Is there a way to add a mass of area's ?
      By Alfa1 in forum VaultWiki Questions
      Replies: 3
      Last Post: February 15, 2016, 3:14 PM
    5. Mass upload
      By hollosch in forum VaultWiki Questions
      Replies: 2
      Last Post: February 20, 2015, 10:15 AM

    Tags for this Thread

    articles, line

    View Tag Cloud

    Bookmarks

    Bookmarks
    • Submit to Digg Digg
    • Submit to del.icio.us del.icio.us
    • Submit to StumbleUpon StumbleUpon
    • Submit to Google Google

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  
    • BB code is On
    • Smilies are On
    • [IMG] code is Off
    • [VIDEO] code is
    • HTML code is Off

    Forum Rules

    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 2:02 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.