Please feel free to provide feedback or file bugs here.

RegEx pattern match causes infinite loop

The following pattern match causes infinite loop.

'"name":"XYZ" Go to Library for reading' | select-string -Pattern '"(.*)+"'

1 vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Jim Vierra shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Jim Vierra commented  ·   ·  Flag as inappropriate

        Also happens with -match operator. The non-repeating version works:

        '"name":"XYZ" Go to Library for reading' | select-string -Pattern '"(.*)"'

        (.*) is the capture group. Adding the + (.*)+ should cause repeating captures in the input but it just hangs when the + is added.

      Feedback and Knowledge Base