-1

I wrote an expect script to login to a few routes and run sh inv command, but the output also contains the below:

********************************* Access Warning!! ***********************************
*                                                                                    *
* This computer system, its network and data contained therein is the property of    *
* the <Company name>. Access to this computer and network is restricted              *
* to persons and programs authorised by the Group only. Access by others is          *
* prohibited and unauthorised, and is wrongful under law. Do not proceed if you      *
* are not authorised. Any unauthorised access will be prosecuted to the fullest      *
* extent of the law.                                                                 *
*                                                                                    *
**************************************************************************************

Is there a RegEx that I can use to remove the above re-occuring paragraph from the text file?

Anesh
  • 194
  • 1
  • 13

1 Answers1

0

It seems from this answer that you could use the Linux command sed.

From there, the above text can be matched with the regex:

\*{33} Access Warning!! \*{35}.*\*{86}

Regular expression visualization

Community
  • 1
  • 1
Taylor Hx
  • 2,815
  • 23
  • 36