How to extract text attached with Tilde ~

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
this is my text


string formula = Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014 +

Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014 +

Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014 +

Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014




so my tilde attached text is Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014 + Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014

after extraction it should look like

output

Consensus Model~Total Operating Expenses-GAAP~CL~4Q 2014

Consensus Model~Total Operating Expenses-GAAP~CL~3Q 2014

Consensus Model~Total Operating Expenses-GAAP~CL~2Q 2014

Consensus Model~Total Operating Expenses-GAAP~CL~1Q 2014

what best logic i should use. after extraction a List should be return which will have constituent like above bold output.

in my text i have used +, - etc operator but these + or - can be any character for which i am facing problem to extract text attach with ~ operator.

please share some code sample.

thanks

Continue reading...
 
Back
Top