Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7501
    supercoolm
    Participant

    when I use this regular expressino to replace many entries each with different value

    (?<=TITLE ").*?(?=")

    TITLE "unknowXML"
    FLAG "OFF"
    Location "."
    TITLE "HTML"
    FLAG "OFF"
    Location "./data/root"
    TITLE "HTML"
    FLAG "ON"
    Location "/home/user/nonroot"
    .
    .
    .

    to something like


    TITLE "1"
    FLAG "OFF"
    Location "."
    TITLE "2"
    FLAG "OFF"
    Location "./data/root"
    TITLE "3"
    FLAG "ON"
    Location "/home/user/nonroot"
    .
    .
    .

    eveytime I replaced one, and it automatically jump to next match.
    The problem is when I enter the new target value for replace and click on replace, it directly replace next value and skip current jumped value

    so the result becomes


    TITLE "1"
    FLAG "OFF"
    Location "."
    TITLE "HTML"
    FLAG "OFF"
    Location "./data/root"
    TITLE "2"
    FLAG "ON"
    Location "/home/user/nonroot"
    .
    .
    .

    I think it’s a bad behaviour, but not sure if it’s a bug

    #7504
    Yutaka Emura
    Keymaster

    Currently, this is the specification although it is not a good behavior.

    When you press “Replace” for the second time, (?<=TITLE ) part does not match the current selection.

    However, you can try this:

    TITLE “.*?”

    TITLE “1”

    and you will see a good behavior.

    #7506
    supercoolm
    Participant

    is it possible to have an option to turn off the auto jump feature?
    I think by disable automatically goto next match will solve the issue

    I was demostrate regular expression in a presentation and having to explain it’s EmEditor’s behaviour issue was kind of awkward.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.