How to exclude the block code for translation from a text file

Here is only a snippet of the text file below,

In the following example code block, the IP ranges are different:

----
cluster_A::> network subnet show

IPspace: Default
Subnet Broadcast Avail/
Name Subnet Domain Gateway Total Ranges
--------- ---------------- --------- ------------ ------- ---------------
subnet1 192.168.2.0/24 Default 192.168.2.1 10/10 192.168.2.11-192.168.2.20

cluster_B::> network subnet show
IPspace: Default
Subnet Broadcast Avail/
Name Subnet Domain Gateway Total Ranges
--------- ---------------- --------- ------------ -------- ---------------
subnet1 192.168.2.0/24 Default 192.168.2.1 10/10 192.168.2.21-192.168.2.30
----

The code block between the start and end ---- need to be excluded for translation, how to do that in the regular expression delimited text filetype?

Parents
  • I am sure if you were to share more of the file(s) you are translating we could find a pattern to exclude the code blocks above.

    DAniel

  • In the following example, the IP ranges are different:
    +
    ----
    cluster_A::> network subnet show
    
    IPspace: Default
    Subnet                     Broadcast                   Avail/
    Name      Subnet           Domain    Gateway           Total    Ranges
    --------- ---------------- --------- ------------      -------  ---------------
    subnet1   192.168.2.0/24   Default   192.168.2.1       10/10    192.168.2.11-192.168.2.20
    
    cluster_B::> network subnet show
     IPspace: Default
    Subnet                     Broadcast                   Avail/
    Name      Subnet           Domain    Gateway           Total    Ranges
    --------- ---------------- --------- ------------     --------  ---------------
    subnet1   192.168.2.0/24   Default   192.168.2.1       10/10    192.168.2.21-192.168.2.30
    ----
    
    ==== IPv6 configuration
    
    If IPv6 is configured on one site, IPv6 must be configured on the other site as well.
    
    *Related information*

    Here it is, with other sensitive client data removed.

    Thank you in advance and looking forward to your idea.

Reply
  • In the following example, the IP ranges are different:
    +
    ----
    cluster_A::> network subnet show
    
    IPspace: Default
    Subnet                     Broadcast                   Avail/
    Name      Subnet           Domain    Gateway           Total    Ranges
    --------- ---------------- --------- ------------      -------  ---------------
    subnet1   192.168.2.0/24   Default   192.168.2.1       10/10    192.168.2.11-192.168.2.20
    
    cluster_B::> network subnet show
     IPspace: Default
    Subnet                     Broadcast                   Avail/
    Name      Subnet           Domain    Gateway           Total    Ranges
    --------- ---------------- --------- ------------     --------  ---------------
    subnet1   192.168.2.0/24   Default   192.168.2.1       10/10    192.168.2.21-192.168.2.30
    ----
    
    ==== IPv6 configuration
    
    If IPv6 is configured on one site, IPv6 must be configured on the other site as well.
    
    *Related information*

    Here it is, with other sensitive client data removed.

    Thank you in advance and looking forward to your idea.

Children
No Data