ack-grep: chars escaping
问题 My goal is to find all " <?= " occurrences with ack. How can I do that? ack "<?=" Doesn't work. Please tell me how can I fix escaping here? 回答1: Since ack uses Perl regular expressions, your problem stems from the fact that in Perl RegEx language, ? is a special character meaning "last match is optional". So what you are grepping for is = preceded by an optional < So you need to escape the ? if that's just meant to be a regular character. To escape, there are two approaches - either <\?= or <