[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] Re: S & R query



On 2018-01-10 16:09, Alan Adams wrote:
In message <90dd40b856.harriet@xxxxxxxxxxxxxxxx>
          Harriet Bazley <lists@xxxxxxxxxxxxxxxxxx> wrote:

On 9 Jan 2018 as I do recall,
          Alan Adams  wrote:

According to the StrongHelp, \s is equivalent to \t\x0A. It is
described as whitespace characters, but I don't see how that
equivalence is for whitespace sharacters. To me it still looks liks
tab followed by linefeed.


It doesn't mean tab *followed by* linefeed. It's just a list of all the characters that are defined as whitespace, occurring in any order, singly or
together.

The confusing thing is that elsewhere \t means tab. Here is means a
list of characters,

No it doesn't.  It means just tab.   And when it occurs inside a list of
characters, it's part of that list.

including those that wrap lines. This doesn't to
me, fit the definition of whitespace.

Like so many things in computing, whitespace means different things in
different contexts.  You might like to read

  https://en.wikipedia.org/wiki/Whitespace_character

It might be better if SE separately defined characters that represent
horizontal whitespace, and vertical ones.


If you're editing a file of HTML then both horizontal and vertical
whitespace characters can be replaced by a single space in most places
in the HTML, though not I would say inside <code>...</>.

There's other languages where you wouldn't want whitespace on one line
to wrap into the next, eg perl where tabs represent logical indents in
if statements etc, not there just to affect appearance.

--
Jeremy Nicoll - my opinions are my own

--
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at
http://diy.Torrens.org/RO/StrongED/index.html