I’m looking for the most efficient Java method that would allow me to ‘delete an embedded string’. For example, if i had the string "Bob said \"Hello world!\".", and I call the method on it, the result should be: "Bob said .". Help would be appreciated!
Note that I want this method to be general, so that if Bob says something besides “hello world” it would still work.
You can try
Use replaceFirst if you only want to remove the first quoted text.