I want to replace any content in my text file in between symbols < and >
What’s the regular expression to accept any symbol ? I’ve currently:
fields[i] = fields[i].replaceAll("\\<[a-z0-9_-]*\\>", "");
But it works only for letters and numbers, if there is a symbol in between < and >, the string is not replaced.
thanks
To accept any symbol,
.*should do the trick.E.g.:
fields[i] = fields[i].replaceAll("\\<.*\\>", "");