I need to extract specific tags from a text file (source code in this case). I've tried many ways, but none of them has been successful.
For example, this is the file:
//messagebox("ñ",string(asc("ñ")))
//messagebox("Ñ",string(asc("Ñ")))
//messagebox("ñ",string(char(241)))
messagebox("Hi")
IF Trim(sle_user_id.text) = "" AND Trim(sle_password.text) = "" THEN
MessageBox(Titulo_Msg,&
"Sr Usuario :~r~nDebe ingresar los datos solicitados.",StopSign!,Ok!)
sle_user_id.SetFocus()
Return
End If
I need to extract (either on the screen or to a file) the text that is inside the parenthesis in the tag "messagebox(THIS IS WHAT A I NEED TO EXTRACT)"
The problems are:
For this case
[**messagebox("ñ",string(asc("ñ")))**]
shows a truncated word, it ends at the first closing parenthesis:**("ñ",string(asc("ñ"**
For this case
[ **MessageBox(Titulo_Msg,& "Sr Usuario :~r~nDebe ingresar los datos solicitados.",StopSign!,Ok!)** ]
shows only the match in the line, but not the complete text between the parenthesis:**MessageBox(Titulo_Msg,&**
I have tried using awk
, grep
, sed
and bash
without success.