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

  • Home
  • SEARCH
  • 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 1113459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:51:39+00:00 2026-05-17T02:51:39+00:00

Has anybody used a good Java implementation of BBCode? I am looking at javabbcode

  • 0

Has anybody used a good Java implementation of BBCode? I am looking at

  1. javabbcode : nothing to see
  2. kefir-bb : Listed as alpha
  3. BBcode parser in JBoss source code.

Are there any better options?

  • 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-05-17T02:51:39+00:00Added an answer on May 17, 2026 at 2:51 am

    The current version of KefirBB 0.6 is not listed as beta anymore. I find the KefirBB parser very easy to configure and extend with my own tags:

    kefir-bb.sourceforge.net

    (This is the best BBCode parser I’ve found so far)

    I also found this code at fyhao.com, but it does protect you against incorrectly nested tags (thus not suitable for parsing user entered input):

        public static String bbcode(String text) {
            String html = text;
    
            Map<String,String> bbMap = new HashMap<String , String>();
    
            bbMap.put("(\r\n|\r|\n|\n\r)", "<br/>");
            bbMap.put("\\[b\\](.+?)\\[/b\\]", "<strong>$1</strong>");
            bbMap.put("\\[i\\](.+?)\\[/i\\]", "<span style='font-style:italic;'>$1</span>");
            bbMap.put("\\[u\\](.+?)\\[/u\\]", "<span style='text-decoration:underline;'>$1</span>");
            bbMap.put("\\[h1\\](.+?)\\[/h1\\]", "<h1>$1</h1>");
            bbMap.put("\\[h2\\](.+?)\\[/h2\\]", "<h2>$1</h2>");
            bbMap.put("\\[h3\\](.+?)\\[/h3\\]", "<h3>$1</h3>");
            bbMap.put("\\[h4\\](.+?)\\[/h4\\]", "<h4>$1</h4>");
            bbMap.put("\\[h5\\](.+?)\\[/h5\\]", "<h5>$1</h5>");
            bbMap.put("\\[h6\\](.+?)\\[/h6\\]", "<h6>$1</h6>");
            bbMap.put("\\[quote\\](.+?)\\[/quote\\]", "<blockquote>$1</blockquote>");
            bbMap.put("\\[p\\](.+?)\\[/p\\]", "<p>$1</p>");
            bbMap.put("\\[p=(.+?),(.+?)\\](.+?)\\[/p\\]", "<p style='text-indent:$1px;line-height:$2%;'>$3</p>");
            bbMap.put("\\[center\\](.+?)\\[/center\\]", "<div align='center'>$1");
            bbMap.put("\\[align=(.+?)\\](.+?)\\[/align\\]", "<div align='$1'>$2");
            bbMap.put("\\[color=(.+?)\\](.+?)\\[/color\\]", "<span style='color:$1;'>$2</span>");
            bbMap.put("\\[size=(.+?)\\](.+?)\\[/size\\]", "<span style='font-size:$1;'>$2</span>");
            bbMap.put("\\[img\\](.+?)\\[/img\\]", "<img src='$1' />");
            bbMap.put("\\[img=(.+?),(.+?)\\](.+?)\\[/img\\]", "<img width='$1' height='$2' src='$3' />");
            bbMap.put("\\[email\\](.+?)\\[/email\\]", "<a href='mailto:$1'>$1</a>");
            bbMap.put("\\[email=(.+?)\\](.+?)\\[/email\\]", "<a href='mailto:$1'>$2</a>");
            bbMap.put("\\[url\\](.+?)\\[/url\\]", "<a href='$1'>$1</a>");
            bbMap.put("\\[url=(.+?)\\](.+?)\\[/url\\]", "<a href='$1'>$2</a>");
            bbMap.put("\\[youtube\\](.+?)\\[/youtube\\]", "<object width='640' height='380'><param name='movie' value='http://www.youtube.com/v/$1'></param><embed src='http://www.youtube.com/v/$1' type='application/x-shockwave-flash' width='640' height='380'></embed></object>");
            bbMap.put("\\[video\\](.+?)\\[/video\\]", "<video src='$1' />");
    
            for (Map.Entry entry: bbMap.entrySet()) {
                html = html.replaceAll(entry.getKey().toString(), entry.getValue().toString());
            }
    
            return html;
        }
    

    BTW javaBBcode is part of opensource project: JavaBB.

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

Sidebar

Related Questions

Has anybody used Eclipse memory manager to detect memory leak in java codes? Can
Has anybody used TreeMultimap in Google Collections? I understand that with a TreeMultimap, its
Has anybody used OProfile tool on android...If you are able to profile please provide
I'm evaluating liquibase for a project starting today. Has anybody used it to create
Has anybody used SmallObjectAllocator from Modern C++ Design by Andrei Alexandrescu in a big
Has anybody used the ATK Framework? It is claimed to be geared toward developing
Has anybody personally used AfxEnableMemoryTracking function provided by MFC to detect memory leaks. How
Has anybody here ever used ngen? Where? why? Was there any performance improvement? when
Has anybody used this import extension before? http://www.ayasoftware.com/content/how-import-configurable-products-csv-file-magento-system#attachments It seems to work pretty good,
Has anybody used the Yahoo User Interface 3 (YUI3) data table with the YUI2

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.