Home Dashboard Directory Help
Search

Script hangs after replacing a lot of regexp's in a very large string by sba


Status: 

Active


2
0
Sign in
to vote
Type: Bug
ID: 779443
Opened: 2/18/2013 8:14:07 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

I wrote a script to "clean up" data from an application logfile that contains Unicode characters in the middle of an ASCII string.

The logic is as follows:

    while ($str -match '(.*)(Wstring={[^}]*\000[^}]*})(.*)')
    {
        $str = $matches[1] + ($matches[2] -replace '\000', '') + $matches[3]
    }

On a particular file, the script hangs (and the PowerShell host consumes CPU).
Details
Sign in to post a comment.
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
hangs_inputdata.xml (restricted) 2/18/2013 -