INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Rename Move & Copy tool not recognizing MC Expression escape sequences  (Read 982 times)

terrym@tassie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 505

I have come across a problem with the Linux Rename Move & Copy Files tool not behaving correctly when there is a valid MC expression language escape sequence in an expression.

For instance the following simple example regex expression should put the [Name] field in a filename:
if(Regex([Name],/#(.+)#/),[R1],) and this does work on Windows it however fails on the Linux version (MC29.0.66).
See attached screenshots for details.

Similarly the following simple test expressions all work on Windows but fail on Linux:
if(1,/#name is (test)#/,) if(1,/*name is (test)/*,) if(1,name is /(test/),)
Again see attached screenshots for details

The above tests all show that the 'normal' MC expression escape sequences are not working in the Linux RM&CF tool.

All the above expressions work fine in an 'Expression Column' on Linux it is only in the RC&MF tool that they fail.
This means it is nigh on impossible to use a regex capture (can't escape the parentheses required) when renaming a file.

Apologies if this is a 'known problem' as I have only started using the Linux version again recently after a break of a few years but I couldn't find any other references on the forum.

I encountered the issue because I was moving some renaming expressions which included regex from my Windows library to a Linux library. Lot of head scratching when they suddenly didn't work!
Hope the example expressions make the issue clear.

Terry
Logged
Good manners cost nothing.
Bad manners can cost you your reputation
― B.D.Hawkey
Pages: [1]   Go Up