UNIX target File Path extraction from cmdLine

Job ID: 36956607

Budget: $10 – $30 USD

write me a regex in PCRE2 flavor in REGEX101. Each match has to be in the first capturing group so try to utilize plenty of non capturing group.

1. Extract file Path
2. Extract File Name
3. Extract File Extension

/usr/bin/python /usr/bin/xattr -r -d com.apple.quarantine /tmp/uptuserslaunchagent.bash\
1st Match: /tmp/uptuserslaunchagent.bash
2nd Match: uptuserslaunchagent.bash
3rd Match: .bash

/usr/bin/sh -ex -c . "/etc/rabbitmq/rabbitmq-env.conf" && echo
1st MATCH: /etc/rabbitmq/rabbitmq-env.conf
2nd Match: rabbitmq-env.conf
3rd Match: .conf

"/usr/bin/sh -ex -c . \"/etc/rabbitmq/rabbitmq-env.conf\" \u0026\u0026 echo \"-----BEGIN VARS LIST FOR PID 10583-----\" \u0026\u0026 set"
1st Match: /etc/rabbitmq/rabbitmq-env.conf
2nd Match: rabbitmq-env.conf
3rd Match: .conf

"/bin/sh -c /usr/local/sbin/thread_count_restarter.sh esomni 1200 automation.util.cfgomni"
1st Match: /usr/local/sbin/thread_count_restarter.sh
2nd Match: thread_count_restarter.sh
3rd Match: .sh

"/usr/bin/containerd-shim-runc-v2 -namespace moby -address /run/containerd/containerd.sock -publish-binary /usr/bin/containerd -id c550ea47399cad5f1d6d5ffa7591d16e64b2ce36eebe4f06c53bab5463af2f60 start"
1st Match: /run/containerd/containerd.sock
2nd Match: containerd.sock
3rd MatchL .sock

"/usr/bin/coreutils --coreutils-prog-shebang\u003ddate /usr/bin/date +%s"
NO MATCH
Related categories: Python Regular Expressions