Title: Dollar Sign Gets 'Eaten' by -replace When More Than One Dollar Sign Adjacent In String · Issue #6842 · PowerShell/PowerShell · GitHub
Open Graph Title: Dollar Sign Gets 'Eaten' by -replace When More Than One Dollar Sign Adjacent In String · Issue #6842 · PowerShell/PowerShell
X Title: Dollar Sign Gets 'Eaten' by -replace When More Than One Dollar Sign Adjacent In String · Issue #6842 · PowerShell/PowerShell
Description: If you try to do a -replace with a string that has two or more dollar signs next to it, one dollar sign gets removed. This happens even if the characters are escaped. Steps to reproduce Scenario 1: Two Dollar Signs in String Literal Scen...
Open Graph Description: If you try to do a -replace with a string that has two or more dollar signs next to it, one dollar sign gets removed. This happens even if the characters are escaped. Steps to reproduce Scenario 1:...
X Description: If you try to do a -replace with a string that has two or more dollar signs next to it, one dollar sign gets removed. This happens even if the characters are escaped. Steps to reproduce Scenario 1:...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6842
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dollar Sign Gets 'Eaten' by -replace When More Than One Dollar Sign Adjacent In String","articleBody":"If you try to do a -replace with a string that has two or more dollar signs next to it, one dollar sign gets removed. This happens even if the characters are escaped. \r\n\r\nSteps to reproduce\r\n------------------\r\n\r\nScenario 1: Two Dollar Signs in String Literal\r\n\r\n\r\nScenario 2: More Than Two Dollar Signs in String Literal\r\n\r\n\r\nScenario 3: One Dollar Sign in String Literal\r\n\r\n\r\nScenario 4: Two Dollar Signs in String Literal (escaped)\r\n\r\n\r\n\r\n\r\n\r\nExpected behavior\r\n-----------------\r\nScenario 1: P@$$w0rd \r\nScenario 2: P@$$$w0rd \r\nScenario 3: P@$w0rd \r\nScenario 3: P@`$`$w0rd \r\n\r\n\r\nActual behavior\r\n---------------\r\nScenario 1: \r\n\r\n\r\nScenario 2:\r\n\r\n\r\nScenario 3: \r\n\r\n\r\nScenario 4:\r\n\r\n\r\nEnvironment data\r\n----------------\r\n\u003e $PSVersionTable\r\n\r\n\r\n\r\n```\r\n","author":{"url":"https://github.com/blixthecat","@type":"Person","name":"blixthecat"},"datePublished":"2018-05-08T18:31:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/6842/PowerShell/issues/6842"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4eb4b453-0df9-583e-6ea6-54202d81fb67 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A040:206367:3DB25:53502:6A5519B2 |
| html-safe-nonce | 79cd8a352952c288ed3c815a4b24c33cf0e33a5c188be64e1cb1471f2d38fe29 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDQwOjIwNjM2NzozREIyNTo1MzUwMjo2QTU1MTlCMiIsInZpc2l0b3JfaWQiOiIzNjc5NTk3ODY5ODEwMzkxNDc0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | fd6a68bfa3c164680b080a520f9c149f43c68a6c3feb7d4a9cbf7cc1254955d9 |
| hovercard-subject-tag | issue:321297467 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6842/issue_layout |
| twitter:image | https://opengraph.githubassets.com/91f1b41f3a7f87144e68dd05d2a9da96a8f00a5a3b897a45d103707e009acb72/PowerShell/PowerShell/issues/6842 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/91f1b41f3a7f87144e68dd05d2a9da96a8f00a5a3b897a45d103707e009acb72/PowerShell/PowerShell/issues/6842 |
| og:image:alt | If you try to do a -replace with a string that has two or more dollar signs next to it, one dollar sign gets removed. This happens even if the characters are escaped. Steps to reproduce Scenario 1:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | blixthecat |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b6d37c6470adadff4194742daaab9a817cc4980 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width