Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
Remove Punctuations with regex
rakesh sugirtharaj
Ranch Hand
Posts: 151
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
IS there a way to remove punctuations in a
String
with Regex and
Pattern
matching?
Cheers!
RSR
Campbell Ritchie
Marshal
Posts: 79177
377
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Try the replaceAll method with punctuation passed as the first argument.
Darryl Burke
Bartender
Posts: 5167
11
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Read the API for java.util.regex.Pattern. There's a POSIX character class that matches punctuation.
Here's a great resource for better understanding of regex:
Learn How to Use and Get The Most out of Regular Expressions
luck, db
There are no new questions, but there may be new answers.
Campbell Ritchie
Marshal
Posts: 79177
377
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I like the regular expression trail in the
Java� Tutorials
.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Regular Expression
treating variable as regex
Regular expression help
Reg Expressions
Regex
More...