#!/usr/bin/perl # http://perlmonks.org/?node_id=1208242 use strict; use warnings; local $/ = 'Pattern'; while(<DATA>) { my %seen; $seen{$_}++ or print "$_\n" for /\b[01X]{7}$/gm; } __DATA__ Pattern 0 (full_sequential) Time 0: period = 100 Time 0: force_all_pis = XX00X1X Time 200: force_all_pis = XX1X0X1 Time 400: force_all_pis = XXX1XX0 Time 600: force_all_pis = XXX1XX0 Time 800: force_all_pis = XXX1XX0 Time 940: measure_all_pos =1 Pattern 1 (full_sequential) Time 0: period = 100 Time 0: force_all_pis = XX0XX1X ... rest not shown ...
In reply to Re: How should I Extract data from text file. Pattern I have to extract should not repeated one.
by tybalt89
in thread How should I Extract data from text file. Pattern I have to extract should not repeated one.
by jumdesumit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |