Need a guide line ….
I am trying to write a personal blog.
What is the standard structure for for input for the post.
I am trying the format like:
This is the simple text
And I am [b] bold text[/b].
This is the code part:
[code lang=java]
public static void main (String args[]) {
System.out.println("Hello World!");
}
[/code]
Is this the right way to store post in the database?
And What is the right method to parse this kind of post?
Shall I use regular expression to parse this or there is another standard for this.
If the above mentioned format is not the right way for storage, then what it could be?
Thanks
Seems to me you are looking for something like BBCode
Take a look on the link, there are several libraries that do this. One example (from Wikipedia):
Disclaimer: Not tested myself
Also take a look on this question: Java BBCode library
Edit: Additional points
the content to other system it would be easier to find filters for this purpose.