LoneWolf wrote: > I have to parse a big file and I do it line by line to keep stuff > going correctly. I am at a point where I need it to go through and > replace every " with inches and ' with feet, IF item in front of it > is a > digit (0-9).
You can use: s/(\d)"/$1 inches/g or s/(?<=\d)"/ inches/g The first captures the digit and uses it the replacement. The second is a zero width look-behind assertion, so only the quote mark gets replaced. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]