joker symbol in Shearch

Help
2007-06-28
2013-04-26
  • Nobody/Anonymous

    many files I work with have difrent tags on them.
    these are surrounded by difrent symbols, mostly []
    now Windows shearch (yeah I knopw it's somewhat lame example) uses the *
    symbol as a joker in the shearches...

    thus typing *[*]* would/should find any files that has both the [ and the
    ]. in the file name... now what I would like to see would be a possiblity
    to shearch for:
    [*] or some other way to simply replace anything inbetween symbol1 and
    symbol2.

    I am sorry if this is included in some way already, but I could not find
    this in the examples and I am having a hard time finding any forums or
    anything like that...
    I know that I have not looked for it in the help file (I just checked a
    little bit and not through the whole) and I too am sorry for that but I am
    too lazy to start reshearching everything about the program :P

     
    • ianaré

      ianaré - 2007-06-28

      Métamorphose uses regular expressions for pattern matching and replacement. These are a little harder to use, but allow for VERY powerful searches.

      To find only files/folders that have '[' and ']' in the name:
      In the picker pannel, check 'Reg-exp' and use the following filter: \[.+\]

      To replace the '[', ']', and all charcaters in between:
      In the - Main - pannel choose 'search' -> 'reg-expr' and use the same expression as above.

      Then 'file' -> 'save config' to save the settings for later use. Clear the path before saving the config so it won't always try to go to the same path.

      explanation:
      In regular expressions, the '[' and ']' are used to define a character set, so we need to escape them with '\'. The '.' matches any character. The '+' matches the preceeding character 1 or more times.

      Look under 'help' -> 'regular exprerssion' for a full reference.

      - ianaré

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks