in reply to Re^4: Regex help
in thread Regex help

Recording the "# Record" column cells as being blank is easy; the hard part would be changing the expression to record non-blank entries. You could just add an empty pair of parentheses, a la /^\s*(\S+)\s+(\S+)\s*()$/. Given that none of the lines contain three non-space blocks, you might even say /^\s*(\S+)\s+(\S+)\s*(\S*)\s*$/. Keep in mind that given these are such general expressions, it is absolutely essential that you test this against real input and be skeptical of the results.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.