"Mike Brown" <mike at skew.org> writes: > I need an example of a regular expression that: > > - matches an empty string > - matches a non-empty string > - does NOT match a string consisting of only a linefeed Try ``re.match('(?!\n)', s)`` (unless of course you can do if s != '\n'). alex