Find acts different between v10 and v12

Find acts different between v10 and v12

1

    Dec 08, 2006#1

    I have a macro written in 10. which is using the find command with regular expressions

    find = *<

    which works in 10 from wherever my cursor is up to the next "<"

    however when I try this in 12, it always goes to the beginning of the next line to perform this search, not from where the cursor is positioned, is this an improvement?

    i.e in a txt where my cursor is as below ( cursor signified by "|", selected text indicated by bold)

    text with cursor in| followed by<
    text on new line<

    in 10 I get this highlight

    text with cursor in followed by<
    text on new line<

    and in 12

    text with cursor in followed by<
    text on new line<

    anyone know why this is or if I can get it to behave as before?

    6,606548
    Grand MasterGrand Master
    6,606548

      Dec 08, 2006#2

      You are right. Find RegExp "*<" works different in v11.20a and v12.20a+4 too.

      The reason is, that *< is a bad regular expression string. * means 0 or more occurencies of any character except new line characters. Although this is not an explanation why in v12 it now always starts the search after a line termination character, a * should be never used without a defined character before and after.

      There is a simple solution which works for v10 and v12. A better regex search string. UltraEdit style!

      Find RegExp "[~<^r^n]++<"

      This will select everthing from current cursor position till next < in the current line only.

      If you want a multi-line selection from current cursor position till next < you can use this regular expression search.

      Find RegExp "[~<]++<"
      Best regards from an UC/UE/UES for Windows user from Austria