strategies{ XLON_DBX0F2_GBP DynamicSpreadQuoter { tradingServiceAttributes { session LSE1 } fairPrice { securityID LU0490618542 securityIDSource 4 service IDNPS } } XLON_DBX1AE_GBP DynamicSpreadQuoter { tradingServiceAttributes { session LSE3 } fairPrice { securityID LU0322252127 securityIDSource 4 service NMP_ABPS } } XLON_DBX1AE_USD DynamicSpreadQuoter { tradingServiceAttributes { session LSE1 } fairPrice { securityID LU0322252171 securityIDSource 4 service NMP_ABPS } } ;; } #### #!/usr/bin/perl # use strict; use warnings; # my $match='XLON_DBX1AE_USD'; my $file = $ARGV[0]; # open (my $fh, '+<', $file) or die "Could not open \"$file\"$!\n"; # my $depth = 0; while(<$fh>) { if($_=~ /$match/){ $depth = /\}/ ? 0 : 1; while($depth) { $_=<$fh>; $depth-- if /}/; $depth++ if /{/; } } else { print; } }