How to set maximum number of wildcard characters in a regex? -


i have directory bunch of xmls, of contain 2 lines this:

31/02/2014 11:15 | bla bla bla target1 bla bla bla 31/02/2014 11:15 | bla bla target 2 bla bla bla bla 

the important thing find lines contain target1 , target2. these 2 lines next each other bla's can different each time, never more 100 characters.

so i'm looking like:

target1[greedy match (maximum 100)]target2 

since target1 , target2 in consecutive lines, can check 1 newline @ middle of regex:

(target1.{1,100}[\n\r].{1,100}target2) 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -