Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression modify
#4
Thanks for your help. 
 The result of the following example is wrong

Macro Macro21
Code:
Copy      Help
_s=
;xzc abc(s "(abc)"); dfg()

str pattern="abc[-\(].*?[-\)]"
_s.replacerx(pattern)
out _s

Using the following powershell code, the result is always correct, But the execution speed is too slow
 
Code:
Copy      Help
$s='xzc abc(s "(abc)"); dfg()';
$s -replace 'abc\((?:(?>[^()]*)|\((?<Open>)|\)(?<-Open>))*(?(Open)(?!))\)'


Messages In This Thread
Regular expression modify - by Davider - 03-12-2023, 01:40 AM
RE: Regular expression modify - by Davider - 03-12-2023, 05:24 AM
RE: Regular expression modify - by redbull2k - 03-12-2023, 05:51 PM
RE: Regular expression modify - by Davider - 03-12-2023, 09:27 PM
RE: Regular expression modify - by redbull2k - 03-12-2023, 11:44 PM
RE: Regular expression modify - by Davider - 03-13-2023, 03:16 AM
RE: Regular expression modify - by Kevin - 03-13-2023, 04:34 AM
RE: Regular expression modify - by Davider - 03-13-2023, 06:13 AM
RE: Regular expression modify - by Davider - 04-16-2023, 06:30 AM
RE: Regular expression modify - by Gintaras - 04-16-2023, 07:57 AM
RE: Regular expression modify - by Davider - 04-16-2023, 12:17 PM

Forum Jump:


Users browsing this thread: 6 Guest(s)