fork download
  1. #!/bin/bash
  2. s="&VAR1 = '1111' and more &VAR1=1111 here"
  3. echo "${s}" | sed "s/&VAR1[[:blank:]]*=[[:blank:]]*'\?1\{4\}'\?/EXAMPLE/g"
  4. echo "${s}" | sed "s/&VAR1\s*=\s*'\?1\{4\}'\?/EXAMPLE/g"
  5. echo "${s}" | sed "s/&VAR1[[:blank:]]*=[[:blank:]]*'\{0,\}1\{4\}'\{0,\}/EXAMPLE/g"
  6. echo "${s}" | sed -E "s/&VAR1[[:blank:]]*=[[:blank:]]*'?1{4}'?/EXAMPLE/g"
Success #stdin #stdout 0s 4400KB
stdin
Standard input is empty
stdout
EXAMPLE and more EXAMPLE here
EXAMPLE and more EXAMPLE here
EXAMPLE and more EXAMPLE here
EXAMPLE and more EXAMPLE here