In my text file there are some strings which I want to exclude using powershell. Sample of my text file looks like this
"DEFINE QLOCAL *ALTDATE(2015-02-19) *ALTTIME(10.38.13) *CRDATE(2015-02-19) *CRTIME(10.38.13) DISTL(NO) MAXDEPTH(999999999) MAXMSGL(32762) REPLACE DEFINE QMODEL('SYSTEM.JMS.TEMPQ.MODEL') *ALTDATE(2015-02-19) *ALTTIME(10.38.14) *CRDATE(2015-02-19) *CRTIME(10.38.14) DEFTYPE(TEMPDYN) DISTL(NO) MAXDEPTH(5000) MAXMSGL(104857600) *ALTDATE(2015-02-19)".
The strings which I want remove from the file all start with asterisks(*) like *CRDATE(12-45-1245) *CRTIME(12.12.12)...
The question is how I'm going to remove from the file using powershell and what kind of command I have to use?.
I have done this on linux using stream editor (SED). For instance sed -e 's/.CURDEPTH.[0-9]*)//' -e 's/.IPPROCS.[0-9]*)//'
But I don't know the equivalent for windows powershell.
Any suggestions can help.
Thanks