From: Ross Shaw Date: 2001-11-30T06:35:22+09:00 Subject: [ruby-talk:26969] How to match '|' but not '\|' I'm a bit of a nuby to regular expressions so I need a little assistance. I have a string that I want to split into separate words that are separated by the pipe character '|'. However I do NOT want to split at points where the pipe is preceded by a backslash '\|'. Here's a quick unit test. Can you fill in the missing regexp? def test_string_split actual = 'Split|me|up\|into|four' (/??????/) expected = %w[Split me up\into four] assert_equals(expected, actual) end Thanks Ross