Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Select-String question

$
0
0

I am writing a PS Select-String to extract out all SQL SELECT statements from a text file.

I am looking extract all SELECT statements. Each SELECT statement terminates with a

;       character.

I can find the the SELECT string fine. I not having any luck with writing the rest of the statement thru the teminator ; character.

The pattern would be find the SELECT pattern and keep returning until the ;

Any suggestions would be assisted.

 

The input file contains hundreds of SQL statements. I only want the SELECTs.

 

 

 

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 10624

Trending Articles