develooper Front page | perl.perl5.porters | Postings from February 2018

[perl #132826] Report a Bug - Regex does not play well at 99,999.99number

Thread Previous
From:
James E Keenan via RT
Date:
February 7, 2018 17:53
Subject:
[perl #132826] Report a Bug - Regex does not play well at 99,999.99number
Message ID:
rt-4.0.24-5833-1518025998-109.132826-15-0@perl.org
On Wed, 07 Feb 2018 11:21:01 GMT, cash_fields@yahoo.com wrote:
> Gang
>     Please read attached doc's.
>     Attached is a .txt file with the screen prints.    There is a
> .docx with highlighted data.    The perl script.    The data.
>     I was trying to places bar (|) in front of data to act as a field
> separator when importing into an EXCEL file. I set the test data file
> to go from 0.99 , 9.99 .... 9,999,999.99.
>     When search & replacing it appears that perl Regex gets confused
> at 99,999.99.
>    It works well for other regex. Tried all kinds of stuff , failed.
>    When I set up the regex , started with manual hardcoded match. 
> Then went to using regex stuff.
>   If the 99,999.99 code is manual , reasonable for the rest , but will
> not add the bar (|) character. When regex is enabled , things get
> worse.
>     File 'k7.pl' is perl script    File 'K2015PASS04.txt' is the data
> file , just a few lines.    File 'Regex at 99999.txt' is a text file
> of the code as it changed and the bad output.    File 'Regex at
> 99999.doc' is same as above file but with painted text to  highlight
> the problem.
>     Perl ver is inside last two files.
> ThanksUC

When submitting a bug report to rt.perl.org, you must include (a) a statement with regard to the bug you believe is present in the Perl 5 core distribution; (b) a short program which demonstrates the bug -- but does nothing else; and (c) an attachment of the output of 'perl -V' from the version of perl you were using to run the program.

My hunch is that you probably have misspecified your regular expression, but I can't say for sure unless you provide a program which precisely demonstrates the bug.  (Simply alleging that the Regex gets confused is not sufficient.)

Thank you very much.
-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=132826

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About