Question : Regular expression in C++ (POSIX)

Hi I am currently doing a POSIX regex in C++ in Ubuntu, I am having diffculty with the expression I had.
Currently I had this expression:

Text :

This is an title

Title Reference part 1Title Reference part 2
Expression :

.*
Result I should get :

This is an title

Title Reference part 1

I do not want to get the 2nd , I thought it should match only the first match occurance???

Answer : Regular expression in C++ (POSIX)

This article does a very good job of explaining how an NFS (vs. DFA) engine works and will help you to write much better regexes.
http://www.foo.be/docs/tpj/issues/vol1_2/tpj0102-0006.html

It's also a good fun read :)
Random Solutions  
 
programming4us programming4us