
June 21st, 2012, 11:50 PM
|
|
Contributing User
|
|
Join Date: Jan 2008
Posts: 201
  
Time spent in forums: 1 Day 1 h 40 m 15 sec
Reputation Power: 8
|
|
|
Bash ignore ? lazy operator in repition regex
Bash appears to ignore the lazy ? operator in the following regex, matching past the first ":" character. Please explain the mistake or the behavior...
if [[ $line =~ ^(.+?): ]]; then
Fixed with:
if [[ $line =~ ^([^:]+) ]]; then
|