I'm a total begginner when it comes to Regex , if any one has a suggestion for a good place to learn more about re Module, I would realy appreciate it .
As for my question , Basically i'm playing around with it to find something like this :
$letters(content)
no \s or \t between $ and letters
letters are either UPPER or LOWER or _ or Numbers (But not at start)
Possible \s or \t between letters and (
Must Ends with )
As for content :
- can Have : UPPERCASE , LOWERCAE , DIGIT , $letter2(..), 'word', "word" , , , +-*/%! , .
You can Imagine it as a Function Calling in this case i guess .
so in Brief , How can i achieve finding such Prototypes :
$Operation(10, $l_shift_byte($random(20)), "addition")
or
$MessageBox(0, "Hello There Bug Boi !\nYour Lucky Number is : "+ $toString((10 - $random(20))), MB_OK)
---------- [ EDIT / UPDATE ] ----------
what i tried (From what Stefan Said ):
^(\s+\$|\$)[A-Za-z_]+(.*)
which works fine but as long as there are no \n inside the ( .. ) example of a not working case where the match stops at \n :
$operation( 10, $l_shift_byte($random(20)), "\naddition")
Also Kept Messing with it and got to this :
^(\s+\$[A-Za-z_]+|\$[A-Za-z_]+)[0-9A-Za-z_]+(\s+\(|\()[\w\W]+(\)|\)\s)$
which Also not working as expected , for example if i try to match this :
$ThisIsATest() $operatio8n_s ( 10, $l_shift_byte($random(20)), " \naddition")$quit()
it Returns everything , since it starts with $acceptable_ch4ars ( ... and ends with ) , wherase it should returns :
[
'$ThisIsATest()',
'$operatio8n_s ( 10, $l_shift_byte($random(20)), " \naddition")',
'$quit()'
]
Thank you in Advance!