in reply to Re^3: comparing columns and printing a result
in thread comparing columns and printing a result

Yeah there was three of them, my mistake, I'm sorry! Oh noes, I have pipes within my list and so running your program gives me an error, but I can always substitute them. Thank you very much! I didn't really ask for a complete program but apparently my code was so screwed up that it was the easiest approach... I need to give a look at your code a bit further so I might understand it some day.. Thank you!
  • Comment on Re^4: comparing columns and printing a result

Replies are listed 'Best First'.
Re^5: comparing columns and printing a result
by cdarke (Prior) on Jan 26, 2009 at 15:57 UTC
    The 'pipes' are part of the regular expression OR syntax. Using join in this way is a common trick to generate a list of alternatives: word|word|word|word. It should not be over-used because a long list can be slow: I assumed that that the number of alternatives was similar to your examples.
    That you have this character in your data should not affect this directly. However, any special RE character from the data that finds itself inside the RE will have to be 'escaped' (there are several ways of doing that, including \Q, quotemeta and qr).