fork(2) download
  1. #!/bin/bash
  2. regex='\[assembly: AssemblyVersion\("([^()]*)"\)\]'
  3. fileContent="foo [assembly: AssemblyVersion(\"1.2.3\")] bar\")] quux"
  4. [[ "$fileContent" =~ $regex ]]
  5. echo "${BASH_REMATCH[1]}"
Success #stdin #stdout 0s 5108KB
stdin
Standard input is empty
stdout
1.2.3