Ticket #22 (seen Feature Request)
sub/gsub support for '&'
| Reported by: | vern | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Bro | Version: | |
| Keywords: | Cc: |
Description
[from a conversation with Vinod Yegneswaran]
It's handy to have '&' in a sub()/gsub() substitution to mean "put the matching text here". Where this gets tricky, however, is in escaping '&' if one wants it literally. You'd think this is simple, but in fact it's complex, to the degree where POSIX awk treats it in an ad hoc / inconsistent fashion. The problem comes about from the desire not to burden the user with zillions of \'s. See http://www.delorie.com/gnu/docs/gawk/gawk_136.html for a discussion of just how weird this can be.
Vinod & I concluded this would best be handled for Bro by a fully consistent approach, even though it can burden the user with lots of \'s.
Note: See
TracTickets for help on using
tickets.