aspose file tools*
The moose likes Beginning Java and the fly likes generating string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "generating string " Watch "generating string " New topic
Author

generating string

Puneet N Vyas
Ranch Hand

Joined: Sep 20, 2007
Posts: 61
abcabdabeabfacdaceacfadeadfaefbcdbcebcfbdebdfbefcdecdfcefdef

consider the above set of strings generated, now i am iterating over the collection containing these strings, now i need to modify each of the string,for example: string abc should be changed to:
a([^ b]*)b([^ c]*)c
similarly other string has to be modified like above,can any one how to do this.

thanks for support
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18836
    
  40

It looks pretty straightforward. What have you tried so far?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19693
    
  20


That should also handle longer strings. Only if the string is empty this code will throw an ArrayIndexOutOfBoundsException.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: generating string