--
You received this message because you are subscribed to the Google Groups "ack dev/users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ack-users/-/oFc767WdL7sJ.
To post to this group, send email to ack-...@googlegroups.com.
To unsubscribe from this group, send email to ack-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ack-users?hl=en.
Hi Raffaele
I know of know such option but...
If you are on Perl 5.10 or later you can use the \K metacharacter
ack "^[^;].*\Kwant"
2:this is wanted
My inital suggestion was to use a lookbehind but that doesn't work because it would have to be variable length.
On 5 August 2012 12:45, Raffaele Ricciardi wrote:
Hello there,
I'm trying to search for a pattern (mostly) outside line comments in Emacs Lisp,
where line comments start with a ; (semicolon). I'm running Ack like this:
ack --elisp --match "^[^;]*(pattern)"
So far, so good. However, Ack highlights the whole match, whilst I'd like only
the submatch I'm looking for - eg "(pattern)" to be highlighted. I can't find
any option to do so. Is it possible?
Thank you.
--
You received this message because you are subscribed to the Google Groups "ack dev/users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ack-users/-/oFc767WdL7sJ.
To post to this group, send email to ack-...@googlegroups.com.
To unsubscribe from this group, send email to ack-users+unsubscribe@googlegroups.com.