Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Turn on, tune up, rock out." -- Billy Gibbons


devel / comp.lang.tcl / Re: BUG or FEATURE "regexp -line..." bypass newline

SubjectAuthor
* BUG or FEATURE "regexp -line..." bypass newlineaotto1968
`* Re: BUG or FEATURE "regexp -line..." bypass newlineaotto1968
 `* Re: BUG or FEATURE "regexp -line..." bypass newlineRalf Fassel
  `* Re: BUG or FEATURE "regexp -line..." bypass newlineaotto1968
   `- Re: BUG or FEATURE "regexp -line..." bypass newlineRalf Fassel

1
BUG or FEATURE "regexp -line..." bypass newline

<uqnhn0$3r6bf$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12952&group=comp.lang.tcl#12952

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1...@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: BUG or FEATURE "regexp -line..." bypass newline
Date: Fri, 16 Feb 2024 12:42:24 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <uqnhn0$3r6bf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Feb 2024 11:42:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="997833a6f55fd8c5c1982d298e10c96a";
logging-data="4036975"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ztyGYENXhoTsJbMk+HdzVSrvyC/8eCy4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:mPgKRgfQlzYONnnM/21TKaA4AOs=
Content-Language: en-US
 by: aotto1968 - Fri, 16 Feb 2024 11:42 UTC

Hi, after spend a couple of time to check some "unwanted" behavior I figure out that
"regexp -line…" bypass the newline "\n" -line border !!

mfg ao

===========================================================================
#!/bin/env tclsh

set txtS {

\noop BEGIN-MkKernel-setup-f
\noop END-MkKernel-setup-f

}

regexp -line -start 0 "^(.*BEGIN-MkKernel-setup-f)(?:\\s.*)?$" $txtS allS prefixS

puts "allS<$allS>"
puts ""
puts "prefixS<$prefixS>"

exit

# ------------------------------------------------------------------
# # allS !! include !! newline
# #
# allS<\noop BEGIN-MkKernel-setup-f
# \noop END-MkKernel-setup-f>
# # prefixS<\noop BEGIN-MkKernel-setup-f>

Re: BUG or FEATURE "regexp -line..." bypass newline

<uqnjm8$3rgf8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12953&group=comp.lang.tcl#12953

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1...@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: BUG or FEATURE "regexp -line..." bypass newline
Date: Fri, 16 Feb 2024 13:16:08 +0100
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <uqnjm8$3rgf8$1@dont-email.me>
References: <uqnhn0$3r6bf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Feb 2024 12:16:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="997833a6f55fd8c5c1982d298e10c96a";
logging-data="4047336"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18H3i1cGRUSRlFLplRZw61MTeWuMBbL1uY="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:m3veokc0L4Dv1ZenHC8G+BlJnRo=
Content-Language: en-US
In-Reply-To: <uqnhn0$3r6bf$1@dont-email.me>
 by: aotto1968 - Fri, 16 Feb 2024 12:16 UTC

Hi,

The core problem is the "\s" token which *include* the "\n" and bypass the "regexp -line ..." restriction

there is also a "[[:blank:]]" which seems to be the "\s" - "\n" but who knows?

I'm not really sure if it is smart to offer an "-line" option and than let the "regexp" decide to follow this
*wanted* behavior.

mfg ao

On 16.02.24 12:42, aotto1968 wrote:
>
> Hi, after spend a couple of time to check some "unwanted" behavior I figure out that
> "regexp -line…" bypass the newline "\n" -line border !!
>
> mfg ao
>
>
> ===========================================================================
> #!/bin/env tclsh
>
> set txtS {
>
> \noop BEGIN-MkKernel-setup-f
> \noop END-MkKernel-setup-f
>
> }
>
>
> regexp -line -start 0 "^(.*BEGIN-MkKernel-setup-f)(?:\\s.*)?$" $txtS allS prefixS
>
> puts "allS<$allS>"
> puts ""
> puts "prefixS<$prefixS>"
>
> exit
>
> # ------------------------------------------------------------------
> #
> # allS !! include !! newline
> #
> #
> # allS<\noop BEGIN-MkKernel-setup-f
> # \noop END-MkKernel-setup-f>
> #
> # prefixS<\noop BEGIN-MkKernel-setup-f>
>

Re: BUG or FEATURE "regexp -line..." bypass newline

<ygao7cgmkd5.fsf@panther.akutech-local.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12954&group=comp.lang.tcl#12954

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralf...@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: BUG or FEATURE "regexp -line..." bypass newline
Date: Fri, 16 Feb 2024 17:42:14 +0100
Lines: 14
Message-ID: <ygao7cgmkd5.fsf@panther.akutech-local.de>
References: <uqnhn0$3r6bf$1@dont-email.me> <uqnjm8$3rgf8$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: individual.net Y93OTmkxtUvlso9o0Xuc/gohkeK0NEOp8KNdOvOxXNA92/f+Q=
Cancel-Lock: sha1:voZ1q3mhEHqMgCLv4/XN6g4T2mU= sha1:RXtzwi6P9ozkwAva7L7QWJ5Ljgo= sha256:bt5gjV0CdVUcKaxaTZqzWOgXrnLqa4yndf9la/mYy6A=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Fri, 16 Feb 2024 16:42 UTC

* aotto1968 <aotto1968@t-online.de>
| there is also a "[[:blank:]]" which seems to be the "\s" - "\n" but who knows?

man re_syntax:

blank A space or tab character.

space A character producing white space in displayed text.

\s [[:space:]]

HTH
R'

Re: BUG or FEATURE "regexp -line..." bypass newline

<uqo7ce$3v4ca$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12955&group=comp.lang.tcl#12955

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: aotto1...@t-online.de (aotto1968)
Newsgroups: comp.lang.tcl
Subject: Re: BUG or FEATURE "regexp -line..." bypass newline
Date: Fri, 16 Feb 2024 18:52:14 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <uqo7ce$3v4ca$1@dont-email.me>
References: <uqnhn0$3r6bf$1@dont-email.me> <uqnjm8$3rgf8$1@dont-email.me>
<ygao7cgmkd5.fsf@panther.akutech-local.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Feb 2024 17:52:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="997833a6f55fd8c5c1982d298e10c96a";
logging-data="4166026"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/x3QWz3/PBHoW2XhJ4qcjHqVXMVpWY8gs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:w8VGWH6zDC1xrWm/x0J0rpVEZSU=
Content-Language: en-US
In-Reply-To: <ygao7cgmkd5.fsf@panther.akutech-local.de>
 by: aotto1968 - Fri, 16 Feb 2024 17:52 UTC

→ what is you message? → the man page I already read.

On 16.02.24 17:42, Ralf Fassel wrote:
> * aotto1968 <aotto1968@t-online.de>
> | there is also a "[[:blank:]]" which seems to be the "\s" - "\n" but who knows?
>
> man re_syntax:
>
> blank A space or tab character.
>
> space A character producing white space in displayed text.
>
> \s [[:space:]]
>
>
> HTH
> R'

Re: BUG or FEATURE "regexp -line..." bypass newline

<ygajzn4mgqt.fsf@panther.akutech-local.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=12956&group=comp.lang.tcl#12956

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: ralf...@gmx.de (Ralf Fassel)
Newsgroups: comp.lang.tcl
Subject: Re: BUG or FEATURE "regexp -line..." bypass newline
Date: Fri, 16 Feb 2024 19:00:26 +0100
Lines: 19
Message-ID: <ygajzn4mgqt.fsf@panther.akutech-local.de>
References: <uqnhn0$3r6bf$1@dont-email.me> <uqnjm8$3rgf8$1@dont-email.me>
<ygao7cgmkd5.fsf@panther.akutech-local.de>
<uqo7ce$3v4ca$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 8E04Ppk4UbTyRdFUPN1WbgvlFIdx5NhFZgj7B+yHkGN9QW2jQ=
Cancel-Lock: sha1:Hl3kEhKXI418VjIYh2Gvgfsg4/E= sha1:zWxyDsMDlsNFQBNMLMP3HK0YwJw= sha256:DUcoPgEArqY/9ERoVGqzYQJ5XqcJJ7fCK87K4Lb6lKY=
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
 by: Ralf Fassel - Fri, 16 Feb 2024 18:00 UTC

* aotto1968 <aotto1968@t-online.de>
| → what is you message? → the man page I already read.
>
| On 16.02.24 17:42, Ralf Fassel wrote:
| > * aotto1968 <aotto1968@t-online.de>
| > | there is also a "[[:blank:]]" which seems to be the "\s" - "\n" but who knows?
| > man re_syntax:
| > blank A space or tab character.
| > space A character producing white space in displayed text.
| > \s [[:space:]]

I was referring to your question "which seems to be...but who knows?".

The manpage answers that question: [[:blank:]] is a space (0x20) or a
tab (0x09), whereas [[:space:]] is anything which produces whitespace in
text, so "[[:blank:]]" is not necessarily "[[:space:]] without \n" (as
which I read "\s" - "\n").

R'

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor