in reply to Get string for a word in a file after some specific pattern compare
What do you mean by string? Do you mean everything that follows "TARGET=" and isn't a space? The general regex looks like this:
But that's still pretty vague and might not fit what you want. Show us a few input records and exactly what data you want to extract from the records and we can better help you.my ( $target ) = ( $string =~ /TARGET=\s*(\S+)/ );
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|