Bug 520064

Summary: problem with rpl -w option and word boundaries
Product: [Fedora] Fedora Reporter: Gerard Torrent <gerard>
Component: rplAssignee: Tim Jackson <rpm>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: rpm
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-09 12:55:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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):
-------------------------------------------------------------
rpl-1.5.5-2.fc11

How reproducible:
-----------------
allways

Steps to Reproduce:
-------------------
#!/bin/bash
#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:
----------------
none

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.