mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
strings.bif/sub,gsub: Respect anchors in pattern
Anchors within pattern passed to sub() or gsub() were previously ignored, replacing any occurrence of '<text>' even when '^<text>' was used as a pattern. This is a pretty user-visible change (and we even have anchored patterns within the base scripts), but seems "the right thing to do". Relates to #3455
This commit is contained in:
parent
d9b8154c4e
commit
e339e93e69
5 changed files with 76 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -23,6 +23,10 @@ Changed Functionality
|
|||
end-of-line $ anchors. Previously, an anchored pattern would be matched anywhere
|
||||
in the input string.
|
||||
|
||||
- The ``sub()`` and ``gsub()` functions now respect the beginning-of-line ^ and
|
||||
end-of-line $ anchors. Previously, an anchored pattern would be matched anywhere
|
||||
in the input string.
|
||||
|
||||
Removed Functionality
|
||||
---------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue