# BBCode Parser

**URL:** <https://www.ruby-forum.com/t/bbcode-parser/176378>\
**Category:** Rails\
**Created:** [September 29, 2009, 9:02pm UTC](https://www.ruby-forum.com/t/bbcode-parser/176378 "2009-09-29T21:02:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@stephen](https://www.ruby-forum.com/u/stephen)\
**Post date:** [September 29, 2009, 9:02pm UTC](https://www.ruby-forum.com/t/bbcode-parser/176378/1 "2009-09-29T21:02:59Z")

</div>

Hi all,

I needed a robust bbcode parser - the existing ruby libaries have alot  
of  
issues with them so I ended up taking the c++ project from Sourceforge  
and  
wrote a small wrapper. So if anyone could use…

[http://rubyforge.org/projects/bbcodelib/](http://rubyforge.org/projects/bbcodelib/)

or

gem install bbcodelib

Then its as easy as:

require ‘rubygems’  
require ‘bbcode’

new\_string = BBCode::parse\_string(original\_string)

If you need to change the ouput, you have to edit the bbcode\_parser.h  
and  
recompile - I might try to remedy this at some point but its certainly  
better than what we have…

Best Regards,  
Stephen Blackstone
