Find lines with more than N characters

Find lines with more than N characters

5
NewbieNewbie
5

    Apr 12, 2005#1

    Hi!
    Is possible that Ultraedit found in different files (opened) the lines with more than N characters (for example 132)?
    If yes, how can i do it?

    261
    Basic UserBasic User
    261

      Apr 13, 2005#2

      As far as I can tell, UE doesn't support the {min,max} RE format, so there is no easy way to do this. You could, of course, do a find with RE "^...<133 dots>....+", but that's a pain. (It would really have to be 133 dots in a row!)

      You could do it in a macro with something like this:

      InsertMode
      ColumnModeOff
      HexOff
      UnixReOff
      top
      Loop
      Key RIGHT ARROW
      Key END
      IfColNumGt 132
      ExitLoop
      EndIf
      IfEof
      ExitLoop
      EndIf
      EndLoop

      (Note that this assumes you don't have the option checked to allow positioning beyond line end.)

      This would find the first line with more than 132 characters in it in the current file. You could then wrap it in a macro to try all open files. But this isn't very elegant either.

      Maybe someone else has an idea.

      Dave
      ASTTMan
      I'm not a Texan, I just live here.

      6,687587
      Grand MasterGrand Master
      6,687587

        Jul 29, 2006#3

        This can be done with a regular expression Find In Files search.

        In UltraEdit style just enter a % (= start of line) followed by 132 ? (= single character except newline).

        With Perl regular expression a more elegant method is available: ^.{132,}. I have not tested this regex!
        Best regards from an UC/UE/UES for Windows user from Austria