View Single Post
Old 10-03-2004, 07:38 PM   #1 (permalink)
yatzr
Insane
 
yatzr's Avatar
 
[JAVA] simple string conversion

i need a method that will take a string like

blah_blah_blah_(stuff).stuff

and turn it into

"blah blah blah"

with the quotes and everything.

I can't use anything based on the positions of the unwanted characters because they're different for each line (except for the extension which isn't always 3 characters anyway). So basically, I need to seek out underscores and change them to spaces, and cut the string short at the first parentheses. I can just concatonate (sp?) the quotes in there later. Thanks for any help in advance.
__________________
Mechanical Engineers build weapons. Civil Engineers build targets.
yatzr is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73