Bug 499235 - Possible Errors with Anchors: ^ $ \A \Z \z
Summary: Possible Errors with Anchors: ^ $ \A \Z \z
Status: REPORTED
Alias: None
Product: krename
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.0.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Heiko Becker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-28 07:33 UTC by Michael Jenkins
Modified: 2025-01-28 18:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jenkins 2025-01-28 07:33:14 UTC
SUMMARY

The Anchors:
^ = Beginning of String (or Line).
$ = End of String (or Line).
\A = Beginning of String.
\Z End of String (or Before Optional Line Break).
\z = Very End of String.

STEPS TO REPRODUCE

I have a file with filename:
0000.0000.txt

(1) For Find and Replace, I can type:
Find = ^.
Replace = X

When I select "Okay",
the proposed filename appears:
X000.0000.Xtx
Is this correct or incorrect ?

Should the proposed filename be:
X000.0000.txt

(2) For Find and Replace, I can type:
Find = .$
Replace = X

When I select "Okay",
the proposed filename is:
0000.000X.txX
Is this correct or incorrect ?

Should the proposed filename be:
0000.0000.txX

(3) For Find and Replace, I can type:
Find = \A.
Replace = X

When I select "Okay",
the proposed filename is:
0000.0000.txt
Is this correct or incorrect ?

Should the proposed filename be:
X000.0000.txt

(4) For Find and Replace, I can type:
Find = .\Z
Replace = X

When I select "Okay",
the proposed filename is:
0000.0000.txt
Is this correct or incorrect ?

Should the proposed filename be:
0000.000.txX

(5) For Find and Replace, I can type:
Find = .\z
Replace = X

When I select "Okay",
the proposed filename is:
0000.0000.txt
Is this correct or incorrect ?

Should the proposed filename be:
0000.0000.txX

OBSERVED RESULT

I have tested these 5 anchors several times.
The results are always the same,
which I have described above.

Please Help.

EXPECTED RESULT

SOFTWARE/OS VERSIONS
Xubuntu 22.04 LTS

ADDITIONAL INFORMATION
7.30am Tuesday 28 January 2025.