Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newline Characters in Regular Replacement
#1
I want to convert the following PowerShell code into QM code. I don't know what to use as a replacement for the newline character
 
Code:
Copy      Help
\n

If don't add
 
Code:
Copy      Help
\n
newline characters, the end of the line will appear as indicated by the red arrow in the following image
[Image: a.png]
Thanks in advance for any suggestions and help

_s.replacerx("(★[^\n]+)\n((?:\n?AAA[^\n]+)+)", "$2\n$1\nXXX\n$2\nVVV")

Powershell Code:
Code:
Copy      Help
$s -replace '(★[^\n]+)\n((?:\n?AAA[^\n]+)+)', "`$2`n`$1`nXXX`n`$2`nVVV"
#2
In QM string s \n is [10]
#3
Useful, thank you!


Forum Jump:


Users browsing this thread: 1 Guest(s)