0

I'm trying to convert BB code to HTML in Java for an Android project. An example of the text in which the bb code is embedded looks like this:

[b]This[/b] is some [url="http://www.example.com"]example[/url] text to display my problem.

There also might be several paragraphs [i]of[/i] text and normal URLs http://www.example.com.

What it needs to look like in the TextView:

This is some example text to display my problem.

There also might be several paragraphs of text and normal URLs http://www.example.com.

Unfortunatly I don't have any code to show you since i don't know how to go about doing this. The only thing i can come up with now is making alot of regular expressions but i´m not sure if that would be the best solution.

Eventually this will all be displayed in an Android TextView.

Any help is appreciated!

Bart
  • 769
  • 2
  • 13
  • 29

1 Answers1

1

There are some java BB-code libraries out there. Check this question for information on them.

Community
  • 1
  • 1
Tim Roes
  • 1,406
  • 1
  • 12
  • 22