tag:blogger.com,1999:blog-8712770457197348465.post5800670049120013007..comments2024-03-28T02:47:19.159-07:00Comments on Javarevisited: StringTokenizer Example in Java with Multiple Delimiters - Example Tutorialjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8712770457197348465.post-36685226672029196732022-04-11T09:19:53.405-07:002022-04-11T09:19:53.405-07:00hello great writeup, i have a large data in a text...hello great writeup, i have a large data in a text file which i have to insert into database example: 1<<__@__>> John:3,1<<__@__>>Paul:3,2<<__@__>> Google:2, and so on here 1 is the document id john is a person name and 3 is it name id . is there any way i can get these data in a proper format so it gets directly inserted into the database rather than printing Charanjit Singhhttps://www.blogger.com/profile/01219957432135426335noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-5159946827089539212019-09-23T22:37:36.054-07:002019-09-23T22:37:36.054-07:00Hey how do I put a space in the delimiter list if ...Hey how do I put a space in the delimiter list if I have multiple delimiters. Example list of delimiters -,./?! and with all these space is also included as a delimiter. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-59767457455613164762017-07-19T05:19:53.214-07:002017-07-19T05:19:53.214-07:00Hello Anonymous, not sure if you can use multiple ...Hello Anonymous, not sure if you can use multiple delimiter in one go. Your solution may be to first break string on one token and then break those tokens again on next delimiter. That's ideal but I think it will work. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-19466240017604008142017-07-18T22:10:15.921-07:002017-07-18T22:10:15.921-07:00Hi,
How can i tokenize string with delimeter ,, or...Hi,<br />How can i tokenize string with delimeter ,, or .. (one delim followedby other)?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-42056433043492929592014-02-03T14:16:10.627-08:002014-02-03T14:16:10.627-08:00Nice writeup Paul. I think StringTokenizer is one ...Nice writeup Paul. I think StringTokenizer is one of those classes which' existence is often forgotten. I also 100% agree on the importance on regular expressions. Might look scary at first, but they are simply unavoidable sooner or later.<br /><br />Just a sidehint: For parsing more complex strings, one can use parsii which provides a quite flexible tokenizer capable of frequently used tokenandyHahttps://www.blogger.com/profile/10560944830858769783noreply@blogger.com