Register / Login
Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Win a copy of
Murach's Python Programming
this week in the
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
I/O and Streams
Regex on scanner question
posted 4 years ago
if i have an input file like following, what could be my regex? below is my try by using scanner
String input = "mycourse-java|myclass-c123\t20"; Scanner s = new Scanner(input).useDelimiter("a-zA-Z\\|a-zA-Z\\t\\d");
**Note: in front of value "20" is a tab
I trying digest a file with following format and i expect my result parse and store into List/array as below
Array = mycourse-java Array = myclass-c123 Array = 20
It is sorta covered in the
JavaRanch Style Guide
Boost this thread!
Testing Input From User
How to regex made up of numbers surrounded by alphabets & special chars
Check if a String has alphabets