Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Zero length matches??  RSS feed

 
Ranch Hand
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
The following code splits the string into 4 strings out of them 3 of are zero length...
I thought i was strong in determining zero length matches..


Can someone suggest me any reference or tutorials regular expressions particularly zero length macthes....
 
Greenhorn
Posts: 14
Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The best brief lesson/tutorial that I found was Sun's own Java regex tutorial.

Zero length matches are well explained in the Quantifiers section of the tutorial.
 
Hareendra Reddy
Ranch Hand
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Sharukh for reply,
I already read that tutorial and i think understood the concept well...
but i need more deep disussion about zero length matches particular...
 
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this help ?



A zero length string is still a match. It is the empty string that resides between two "aaa" strings.
 
Hareendra Reddy
Ranch Hand
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Deepak ...
I understood that problem ..
I want to read more about zero length matches...
can you suggest me some references??
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hareendra Reddy wrote:Thank you Deepak ...
I understood that problem ..
I want to read more about zero length matches...
can you suggest me some references??



You can dive into the Pattern and Matcher implementations and knock yourself out. Those are the best references
 
Hareendra Reddy
Ranch Hand
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Deepak..
 
Sheriff
Posts: 9613
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are books available on regular expressions like "Mastering Regular Expressions" or "Java Regular Expressions" which you can go through if you want in-depth knowledge of regular expressions...
 
Shahrukh Naqui
Greenhorn
Posts: 14
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is also this Regular expressions website, if you haven't found it already. Its quite detailed.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!