• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help with regular expression  RSS feed

 
Katja Ernst
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, im trying to convert a string like this

hello mylist liststart:1.one 2.this is point two 3.and here we have point three 4.whatever12345 5.:-) end:listend rest of the line

into some valid html code (html list). when im finished it should look like this:

<ol start="1" type="1">
<li>one</li>
<li>this is point two</li>
<li>and here we have point three</li>
<li>whatever12345</li>
<li>:-)</li>
</ol>

here is what i have so far:





but this code doenst work correctly. anyone any idea?

thanks in advance :-)
 
Thennam Pandian
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this one.

System.out.println("<ol start=1 type=\"1\">" );

System.out.println("<li>"+s.substring(25,28)+"</li>");
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!