Re: [Clip] Notetab or RegEx Bug
- Art Kocsis wrote:
> So is this a bug in RegEx or a bug in Notetab?I agree it must be a bug. In a highlighted block consisting of empty
> (tested NTB 5.8/fv & 6.2/fv).
lines and one line of spaces
^!Replace "^.*([\H]).*$" >> "xyz" RH1
replaces the first newline in the block.
Please give some more context.
1. Failed list
2. passing list
3. How are you capturing the "error condition" from the find? What code? I use "Find" to find things or not. Where does the "error condition" come in. Please help me go deeper here?
4. Why the RH? Regex R of course, but are you looking at whole document W or only a selection H?
"should throw an error condition for any line consisting solely of horizontal white space"
I read the line above to be saying find (throw error??)
^!find "^\h+\r\n" RH
^!find "^\h+$" RH
That finds empty lines.
On 4/09/2013 11:14 PM, Art Kocsis wrote:
This sure looks like a bug to me but I am not sure whose responsibility so am dual posting to clips and scripts.
^!Find "^.*[\H].*$" RH (or equivalent) ^!Find "^.*[^\h].*$" RH
should throw an error condition for any line consisting solely of horizontal white space (HT, NBSP, SP), such as spaces, but it does not.
Trying to isolate the "found" non-white space character via
^!Find "^.*\K[\H](?=.*)$" RH (or equivalent) ^!Find "^.*\K[^\h](?=.*)$" RH
results in no matches but no error condition either.
Substituting an "S" or "s" for "H" or "h" respectively yields the correct results.
However, the "S" meta character includes vertical white space characters (LF, VT, CR, NL) which is not always wanted.
So is this a bug in RegEx or a bug in Notetab? (tested NTB 5.8/fv & 6.2/fv).