fork(5) 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 5152KB
stdin
Standard input is empty
stdout
1.2.3