Regex Negation

View some of the Frequently Asked Questions to our support staff. Included are some tips and tricks making this forum ideal for users getting started with GoAnywhere MFT. Note: Users can reply to existing topics but only our support staff can add new topics to this forum.
1 post Page 1 of 1

Support_Josh

User avatar
Posts: 12
Joined: Thu Feb 16, 2017 11:20 am

Post by Support_Josh » Tue Nov 06, 2018 5:20 pm
Question:
Does GoAnywhere support regex negation? (The symbol ^ in a regex expression)

Answer:
Yes, GoAnywhere supports regex negation even when using monitors. This functionality can be handy when using a monitor since the monitor itself cannot be set to exclude a set of files, you can use a regex expression to select the files you don't want to include and then negate the expression.

Example:
I want to monitor a folder for all files existing that don't start with error*.*

File List:
test.txt
error.txt
error1.txt
error2.txt
goanywhere.log
catalina.out

Working Regex Expression:
^(?!error).*
NOTE: The above expression will select all entries that start with the word error and then return the opposite.

Output List:
test.txt
goanywhere.log
catalina.out
Joshua Przybysz
Senior Support Analyst
e. [email protected]
p. 1.800.949.4696
w. HelpSystems.com
1 post Page 1 of 1