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 Chriss Miller 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. darthjef

    Perl regex questions for perl script using file::find

    I just tested it with find( sub { return unless (/\.$doctype$/i); my $year=''; local @ARGV = $_; local $/ = "\n\n"; local $^I = '.bac'; while( <> ) { if (/=099.*?(\d\d\d\d)\n/s) { $year = $1; s/(=099.*?)(\d\d\d\d)\n/$1\n/s...
  2. darthjef

    Perl regex questions for perl script using file::find

    Yes the date would only be in =099 and there is only one per record. so to include \n before =099 did you mean this: if (n\/=099.*?(\d\d\d\d)\n/s) { $year = $1; s/(\n=099.*?)(\d\d\d\d)\n/$1\n/s; (not sure if that one is right)...
  3. darthjef

    Perl regex questions for perl script using file::find

    The code change didn't work. The file is actually just a text file so I think its just a CR. Here is an example of a 2 record file. (these aren't actually MARC records but text representations of them) =LDR 00877nam 2200265 a 4500 =001 lbk00003424\ =005 20070829165504.0 =008...
  4. darthjef

    Perl regex questions for perl script using file::find

    Just tested that and its still returning the first record's date in all the other records. Again I am stumped. Any more help would be appreciated! Thanks darthjef.
  5. darthjef

    Perl regex questions for perl script using file::find

    Hi again brigmar. I spoke too soon. I actually need it to pick up the date for each individual record. The files to process contain a number of records each with a potentially different date in the 099 field the script as it is grabs the date from the first record and then globally processes...
  6. darthjef

    Perl regex questions for perl script using file::find

    Thanks so much brigmar! That is exactly what I want the script to do. the removal of the date from 099 I can handle from here. Again thanks so much for the help. darthjef
  7. darthjef

    Perl regex questions for perl script using file::find

    That would be great! Thanks
  8. darthjef

    Perl regex questions for perl script using file::find

    darthjef (TechnicalUser) 11 Sep 07 12:54 Perl regex questions for perl script using file::find Hi Im having a problem getting my perl script to run properly. I'm new to perl and programming in general and am at a loss as to how to proceed. I am trying to capture a group variable ($1) from...

Part and Inventory Search

Back
Top