aspose file tools*
The moose likes Beginning Java and the fly likes regex Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "regex" Watch "regex" New topic
Author

regex

meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305


OUTPUT:

Match number 1
start(): 0
end(): 3
Match number 2
start(): 4
end(): 7
Match number 3
start(): 8
end(): 11

i don't understand how is it working

what i understand regx says match substring where "spacedogspace " i think there is only one match should be found at index 3.


My one regret in life is that I am not someone else.
- Woody Allen
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41884
    
  63
Where do you think you're specifying the "space" before and after the word? Have you read the javadocs of the java.util.regex.Pattern class to learn what all the regexp options and special characters mean?


Ping & DNS - my free Android networking tools app
meeta gaur
Ranch Hand

Joined: Dec 05, 2012
Posts: 305

Ulf Dittmer wrote:Where do you think you're specifying the "space" before and after the word? Have you read the javadocs of the java.util.regex.Pattern class to learn what all the regexp options and special characters mean?


Thanks, there was some confusion ,after reading i got that i thought \\b is for escape sequence backspace.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regex