Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Match comments
#1
hello everyone,
I wanted to use regular expressions to match comments, 

But, lables and comments are very similar. How to distinguish them?

In the following example:
Line 1 was deleted
Line 3 was not deleted
Line 8 was not deleted

Expected results:
___________________________
 lable1
run "notepad"
_i+1
if _i=3
    ret
goto lable1
___________________________

Any suggestions are welcome. Thanks in advance


Macro Match comments
Trigger Aq /QM     Help - how to add the trigger to the macro
Code:
Copy      Help
_s.getsel
_s.replacerx("^\s.+\n|\s;;.+" "")
mes _s
out _s


Macro comment test
Code:
Copy      Help
;lable1
run "notepad" ;;comment
;run "notepad" ;;comment2
_i+1
if _i=3
,ret
goto lable1
;coment3


Messages In This Thread
Match comments - by macman - 01-26-2021, 03:25 AM
RE: Match comments - by redbull2k - 01-26-2021, 12:46 PM
RE: Match comments - by macman - 01-26-2021, 11:41 PM
RE: Match comments - by Kevin - 01-26-2021, 11:54 PM
RE: Match comments - by macman - 01-27-2021, 01:44 AM
RE: Match comments - by Kevin - 01-27-2021, 02:16 AM
RE: Match comments - by macman - 01-27-2021, 03:03 AM
RE: Match comments - by macman - 01-29-2021, 12:50 AM
RE: Match comments - by Kevin - 01-29-2021, 04:26 AM
RE: Match comments - by macman - 01-29-2021, 05:44 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)