Converting cases with UE style regular expression

Converting cases with UE style regular expression

3
NewbieNewbie
3

    13:18 - Aug 28#1

    With text such as:

    "    ! Determine which case"

    I'm wondering if it possible to use UltraEdit's Regular Expression style (as opposed to Perl) to lower the case of the first letter after "!"?  I was thinking something along these lines to catch the input:

    "    ! ^([A-Z]^)^([a-z]^)"

    But I'm not seeing how the first tag (^1) could then be replaced by it's lowercase equivalent using an UltraEdit style regular expression?

    6,686585
    Grand MasterGrand Master
    6,686585

      16:29 - Aug 28#2

      The legacy UltraEdit and Unix regular expression engines do not support changing the case of letters during the replace as the powerful Perl regular expression engine.

      It would be necessary to use a macro which runs an UltraEdit regular expression find in a loop and uses the UltraEdit command to convert the found string to lower case.

      Code: Select all

      InsertMode
      ColumnModeOff
      HexOff
      UltraEditReOn
      Top
      Loop 0
      Find MatchCase RegExp "! [A-Z]"
      IfFound
      ToLower
      Else
      ExitLoop
      EndIf
      EndLoop
      The macro command UltraEditReOn is UnixReOff in very old versions of UltraEdit with no support for the Perl regular expression engine.
      Best regards from an UC/UE/UES for Windows user from Austria

      19476
      MasterMaster
      19476

        8:37 - Aug 29#3

        Hi Emorway,

        Just out of curiosity - why not Perl regexp?

        Thanks, Fleggy