Bug 520064 - problem with rpl -w option and word boundaries
Summary: problem with rpl -w option and word boundaries
Alias: None
Product: Fedora
Classification: Fedora
Component: rpl
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Tim Jackson
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-08-28 08:42 UTC by Gerard Torrent
Modified: 2010-04-09 12:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-04-09 12:55:45 UTC
Type: ---

Attachments (Terms of Use)

Description Gerard Torrent 2009-08-28 08:42:35 UTC
Description of problem:
Seems that rpl -w option don't takes into account punctuation signs as word boundaries

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
#creating data file
echo ".rande" > test2.txt
#running replace (with -w option)
rpl -w "rande" "grande" test2.txt
#word not changed (grep returns 0 lines)
grep grande test2.txt;
#grep catch correctly word boundaries
grep -w rande test2.txt;
Actual results:
change not made
'.rande' -> rpl -w "rande" "grande" -> '.rande'

Expected results:
'rande' replaced by 'grande'
'.rande' -> rpl -w "rande" "grande" -> '.grande'

Additional info:

Comment 1 Tim Jackson 2009-08-28 11:51:12 UTC

*** This bug has been marked as a duplicate of bug 519321 ***

Comment 2 Gerard Torrent 2009-08-28 14:38:16 UTC
(In reply to comment #1)
> *** This bug has been marked as a duplicate of 519321 ***  

I don't inspected the code, but the behavior of this bug and bug 519321 is distinct. In bug 519321 sometimes ocurr an incorrect replacement. In this bug always does an invalid replacement when word boundary contains a punctuation sign.

Comment 3 Tim Jackson 2009-08-29 15:30:45 UTC
OK, I see now it's a different problem but it is presumably related and in any case this stuff would be better filed upstream.

Note You need to log in before you can comment on or make changes to this bug.