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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by eggmatters

  1. eggmatters

    How can I track my position in a regex?

    ok, essentially, I'm performing a find and replace on data that exists in a large XML file (derived from a Visio) I am finding data in the XML file from a list I've derived from an excell spreadsheet Also from that spreadsheet I have data I want to replace the old data with. The $infile...
  2. eggmatters

    How can I track my position in a regex?

    Well, essentially, I can use pos() to find the position returned by (*?), or $1. I want to take $1 and see if it matches some other stuff, and if so, replace the value of $1 <i>at</i> whatever was returned by pos(). Perhaps some variant of: while($infile=~/<Text>(.*?)<\/Text>/gs){ $itsPos =...
  3. eggmatters

    How can I track my position in a regex?

    YES!!! that is exactly what I needed. I was concerned that within the block, when I invoked another regex, it would lose it's position. The marker replacement was an un-graceful approach to tracking the position of the tag. Thank you for you insight. Expect more Perl questions from me! Speaking...
  4. eggmatters

    How can I track my position in a regex?

    Ok, I got that figured out. $infile =~ s/(<Text>)(.?)(<\/Text>)/$marker/s; Now I just need to figure out how to call it iteratively for each instance. For some reason, Perl isn't letting me write a function that contains that regex to be called.
  5. eggmatters

    How can I track my position in a regex?

    I am attempting to 'find and replace' content in a rather large XML file. Basically, I am exporting data from an excel spreadsheet into a Visio. Some of the fields don't match directly due to existence of newlines, spaces, special characters and other subtle differences between tags. Roughly...

Part and Inventory Search

Back
Top