|
Post by George on Nov 22, 2022 11:10:22 GMT -5
First problem is triggered by the appearance of the ] at the end of an operand. This triggers the logic for [...] type operands (used by SUBMIT and RUN) where no checking is done between the [ ] as the syntax is a complete unknown. I checked the handling, and I'm sorry but I'm not changing it, the whole [...] support almost breaks the parser as it is.
I did tighten up the regular quote checking a bit.
George
I'll have a look at RETRIEVE.
|
|
|
Post by George on Nov 22, 2022 13:40:17 GMT -5
You're a never ending source of work aren't you.
For EFT, the length of the returned found string should always equal the length of the filename string. I can verify that.
(a) when a RegEx find finds a "" null, you need to treat it like it didn't find anything. I just did a test with
C R'.{0,1}' '###'
and it successively will change every character, one at a time, each time you press F6.
OK, easy to do. No need to show me the Regex code, I haven't clue what it says.
(b) If a Find or Change of a RegEx finds a "" at the end of the line, somehow you need to skip that null and go on to the next line, if that's what the command should normally do.
This is the same as the above.
(c) If you issue a FIND R'.*' PREV and then keep pressing F5, it will skip every other line - sometimes finding null lines and sometimes finding lines with data - but it's every other line and not every line. This is a garden variety bug here.
There are warnings in Help about using LAST or PREV with RegEx strings. Probably because I could not get them to work properly. I'm not even going to look at this. It's monkeying around in the general search routine and how it handles setting positions for RFIND/RCHANGE. It's an area best left alone. I'm not poking the bear.
George
|
|
|
Post by George on Nov 22, 2022 14:44:35 GMT -5
I don't wrap anything around RegEx, I figure if someone is coding it, they probably know a heck of a lot more than I do. Same should be true for the EFT versions. Your EFT_Translate can do whatever you like in building RegEx strings.
George
|
|
|
Post by George on Nov 23, 2022 12:02:22 GMT -5
Well, here we disagree. As I said, if a user specifies a Regex themselves, we should not touch it. If it matches a substring - maybe that's what they want. If it doesn't work - it's on them. They can always use the SPFTest program to play around to get things correct.
We should just focus on getting OURS correct.
|
|
|
Post by Stefan on Nov 23, 2022 13:23:52 GMT -5
I gather it's a matter if good practice rather than an absolute requirement. The regex style guide recommends using anchors whenever possible, even if not absolutely necessary. Anchoring a Reg-EXpression at one or both ends confines the engine's activity to a particular context, thereby improving efficiency by avoiding wasting time searching for the same pattern elsewhere.
|
|