regex - Get a line after match found in PHP -


I have a text file that contains rows as usual:

  codes Fissel Data Dr. STAMPA 010 9 7800625 ... ... codus efile FRRVCN68S14E487E & lt; ------------------------ I need the data of this line to obtain the Exchange data   

the marked line For that I will parse the text. I tried to explode the text between "codes fiscale" and "data asthen's data" but it does not work. Any suggestions?

  function getBetween ($ content, $ start, $ end) {$ r = explosion ($ start, $ content); If (isset ($ r [1])) {$ r = explosion ($ end, $ r [1]); Return $ R [0]; } Return ''; } $ NewName = getBetween ($ fileContent, 'Codes Fiscal', 'Data Contemporary Data');  

  preg_match ('/ CODICE FISCALE \ n (. *?) Data Ezinezine data / s', $ file content, $ match); $ Line [1] is your line  

See a demo here:


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -