LVware @ 08/22/19, 16:28
On BRE and ERE
How to find out what is used in the program? I use MT Manager to work with text.
LVware @ 08/22/19, 16:28
^ BC - find a line starting with BC
I know this, but if the search text is not at the beginning of the line, then how can I find it? Even if the text is not at the beginning of the line, the result is the same.
LVware @ 08/22/19, 16:28
\ $ & - replace with $ and the found string
Does not work, replaces with "$ &"
Look for (BC) and change to A (\ 1), get ABC.
Result as above. It turned out only by writing in the replacement "$ 1".
It’s just that you mixed up in which direction he should “look”.
And what indicates where to look? I didn’t seem to indicate anything and didn’t even think that it was necessary to indicate anything else, only from you I found out. Is the fact that the group is to the left of BC not an indication that the group needs to be searched on the left?
Bill Baklushi @ 08/23/19, 12:41
(?<! \ $) BC (? = \ S)
Oh, it works as it should! And what does "<"?
And yet, to replace, as I need, I did so
and in the replacement line wrote "\ $$ 2", since "BC" is in the second group. But the text is simply replaced with nothing, as with "\ $$ 3", and only with "\ $$ 1" is replaced with "$ BC". Why so? Indeed, in the expression there are three groups, and the replacement works for the second group as if it were the first.
Post has been editedCamel - 27.08.19, 18:00Reason for editing: Removed the extra word "works" in the last sentence