Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. newbie1006

    regular expression issue...

    I have a script that would check a xml file and find me strings that are between tags <Register> ...</Register> script is : while (my $line = <FILE>) { if ($line =~ m/<Register>/) { my $nextline =<FILE>; if ($nextline =~ /^(.*)]*<\/Register/) { my $string = $1...
  2. newbie1006

    REGULAR EXPRESSION TROUBLE

    The Program code: use strict; use warnings; my @register_list; open (FILE, "Peint_FcN.xml"); while (my $line = <FILE>) { if ($line =~ m/<Register>/) { my $nextline =<FILE>; if...
  3. newbie1006

    problems with &quot;for&quot; loop in perl

    if ($string =~ /(.*?)u(.*)/s) { my $pre = $1; my $post = $2; for my $index(0..4) { print "$pre$index$post\n"; push(@register_list, "$pre$index$post"); } } is there a way to make it print like 0,1,2,3,4 and not just 1,2,3,4??
  4. newbie1006

    Is it possible to substitue 1 value with 'n' number of values???

    Thank you very much Miller, but this would just work for that particular string. I have a numerous of those lines in an array, and I need to read an array and for every single line that has a 'u' it has to replace it with those 4 other substitutions I need and print that out.
  5. newbie1006

    Is it possible to substitue 1 value with 'n' number of values???

    I have a file with content and I'm extracting information from it and storing it in an "array" and I have number of statements in that array. So when I see something like this "FRSVTu_ORT_TRU" in the array I should be able to do something and print out this output: FRSVT0_ORT_TRU...
  6. newbie1006

    Need help with HASH in perl!

    How can I point to an array using hash? I have an array and I have a hash, I want the data in the array to be accessed through hash. How can I do that?? Please help me out. Thank you in advance.
  7. newbie1006

    Is it possible to substitue 1 value with 'n' number of values???

    Example: Input: FRSVTu_ORT_TRU Output: FRSVT0_ORT_TRU FRSVT1_ORT_TRU FRSVT2_ORT_TRU FRSVT3_ORT_TRU is there a way to do this using perl scripting?
  8. newbie1006

    Perl &amp; XML...need help

    I want to print out the tag <Register> everytime it sees one in the entire xml file.
  9. newbie1006

    Perl &amp; XML...need help

    perl script: use strict; use warnings; open FILE, "reg_sample.xml" or die $!; while (my $line =<FILE>){ if($line= ~ m/<Register> (.*?) <\/Register>/g) { print $line; } } I just realized that in the xml file, I see register in following format: <Register>...

Part and Inventory Search

Back
Top