Dear All, i have created the below script working fine to extract the query text and store in a variable. After that, i need to place the values after two carriage returns. I don't know how to place the query values after two carriage return.
Kindly suggest friends!
use strict; use warnings; my $InputXmlFile = $ARGV[0]; my $OutputXmlFile = $InputXmlFile; my $OutProcesText = ""; $OutputXmlFile =~ s#\.tex$#\.tex#gsi; my $workingpath = $1 if $InputXmlFile =~ m/(.*)\\(.+)\.tex/i; my $filename = $2 if $InputXmlFile =~ m/(.*)\\(.+)\.tex/i; open (INTXT, "$InputXmlFile") ||die ("Can't open the input file $I +nputXmlFile"); my $inText = join("",<INTXT>); close (INTXT); while($inText =~ m#\\section\{(.*?)\}\n\n#gi) { my $qrtext = $1; if ($qrtext =~m/\\qr\{(.*?)\}/) { my $qrFindText = $1; print $qrFindText; } }
In reply to Re^4: String manipulation in a document
by ponni
in thread Grep a particular text
by ponni
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |