babyboomer Posted November 16, 2019 Share Posted November 16, 2019 Is it possible to use a formatting (escape) sequence in the Java printf statement to remove specific characters from the string argument? For example, if I have a string like, "[0, 1]", is there a formatting string I can use to remove the left and right bracket characters ([])? Is there a "regular expression" for the Java printf statement that will filter out those characters? Link to comment Share on other sites More sharing options...
Evelyn Johnson Posted December 6, 2019 Share Posted December 6, 2019 On 11/17/2019 at 4:42 AM, babyboomer said: Is it possible to use a formatting (escape) sequence in the Java printf statement to remove specific characters from the string argument? For example, if I have a string like, "[0, 1]", is there a formatting string I can use to remove the left and right bracket characters ([])? Is there a "regular expression" for the Java printf statement that will filter out those characters? Yes. It will helpful. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now