Read file-> extract the sentence to extract word
Posted: 27 Feb 2015 12:03
I have following text
I need to get the line of text that contains TM1.Cube.Dependency and within that sentence I need to grab the UNIQUE items that are in single quotes.
So I'd retrieve the sentence:
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_project_lob_history' depends on cube '}ElementSecurity_project_lob_history'.
and get '}ElementAttributes_project_lob_history' and '}ElementSecurity_project_lob_history'
continue to process the file but if I see the same items '}ElementAttributes_project_lob_history' and '}ElementSecurity_project_lob_history' it would ignore and continue to next. Of course this is done in batch only no 3rd party tools.
thanks in advanced.
10444 [] INFO 2015-02-25 00:57:59.040 TM1.Process Process QueBIT Sample - Turn On Cube Logging executed by chore Admin.Enable.Cube.Logging.30min.Interval
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_project_lob_history' depends on cube '}ElementSecurity_project_lob_history'.
10444 [] INFO 2015-02-25 00:57:59.040 TM1.Process Process "QueBIT Sample - Turn On Cube Logging": finished executing normally, elapsed time 0.00 seconds
10444 [] INFO 2015-02-25 00:57:59.040 TM1.Chore Chore "Admin.Enable.Cube.Logging.30min.Interval" time = 0.00 seconds
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_project' depends on cube 'CPX_DETAIL2'.
10444 [] INFO 2015-02-25 00:57:59.040 TM1.Chore Chore "Admin.Enable.Cube.Logging.30min.Interval" finished executing
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Chore Chore "Admin.Add.Cube.Dependencies@200AM" executed by scheduler
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Process Process Admin.Add.Cube.Dependencies executed by chore Admin.Add.Cube.Dependencies@200AM
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_project' depends on cube '}ElementSecurity_project'.
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_}Groups' depends on cube '}ElementSecurity_project'.
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_project_lob_history' depends on cube '}ElementSecurity_project_lob_history'.
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_}Groups' depends on cube '}ElementSecurity_project_lob_history'.
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_project' depends on cube 'CPX_DETAIL'.
I need to get the line of text that contains TM1.Cube.Dependency and within that sentence I need to grab the UNIQUE items that are in single quotes.
So I'd retrieve the sentence:
10456 [] INFO 2015-02-25 01:00:29.859 TM1.Cube.Dependency Adding cube dependency: Cube '}ElementAttributes_project_lob_history' depends on cube '}ElementSecurity_project_lob_history'.
and get '}ElementAttributes_project_lob_history' and '}ElementSecurity_project_lob_history'
continue to process the file but if I see the same items '}ElementAttributes_project_lob_history' and '}ElementSecurity_project_lob_history' it would ignore and continue to next. Of course this is done in batch only no 3rd party tools.
thanks in advanced.