Ticket #22 (seen Feature Request)

Opened 3 years ago

Last modified 3 years ago

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.

Change History

comment:1 Changed 3 years ago by robin

  • Status changed from new to seen
Note: See TracTickets for help on using tickets.