fork download
  1. #!/bin/bash
  2. line1="0xffffffc0006e0584 is in some_function (/path/to/my/file.c:93)."
  3. regex="^([[:alnum:]_]+[[:space:]]){1,5}\(((/[[:alpha:]]+)+\.[[:alpha:]]):([[:digit:]]+)\)\.$"
  4. [[ $line1 =~ $regex ]]
  5. echo ${BASH_REMATCH[2]}
  6. echo ${BASH_REMATCH[4]}
Success #stdin #stdout 0s 4300KB
stdin
Standard input is empty
stdout
/path/to/my/file.c
93