Author Topic: Regular expressions syntax  (Read 12178 times)

khaoos

  • Newbie
  • *
  • Posts: 8
    • View Profile
Regular expressions syntax
« on: May 14, 2013, 03:43:26 »
Hello, Mathias! First of all, big thanks for updating searching in binaries in v. 3.1. It seems to me that it works. I started to use it heavily and realized that I don't know how to properly use regex searching in mc. Some constructions that I regulary use in other applications don't work here. For example, nor /s nor [:space:] don\t work as class of "space" characters; lookahead and lookbehind: (?=), (?!), (?<=), (?<!); possessive quantifier: ++ (but it seems *+ and lazy versions *? +? work); backreferencing causes mc to hang at all (i am searching "(a)\1" in folder with one plain text file, which contains "aa"), so I have to close it through task manager.  Could you provide some information about syntax of regex mechanism using by mc?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: Regular expressions syntax
« Reply #1 on: May 14, 2013, 07:01:50 »
You can not use RegExp to search in binaries. RegExp only works for text

Regular expression are a pain and I have not had the time to learn it. So I don't know all the rules for regular expression.
I have not built the regular expression engine in MC my self.
Search is using a RE engine that is provided by MS. Other places in MC is using one that is provided by the programming language, Search will move over and use that in the future.