Reputation: 29
I am using this code:
m/MSG\[(.+)\]/
to detect any character between square brackets and coloring it using this code:
if($currentLine=~m/MSG\[(.+)\]/){
$p1=$1;
$outp="$p1";
$currentLine=~s/MSG\[(.+)\]/MSG[$cg$outp$crs]/g;}
The above code colors to the end of the line and doesn`t detect the close square bracket. How can I get this to only color to the close square bracket?
for example, using this code, (.+) meaning:
((\?+\s+\?+)|(\?+\s+\d+)|(\w+\s+\?+)|(\w+\s+\w+)|(\d+)|(\w+)|(\?+)|(\d+\s+\w)|(\?+\d+)|(\?+\s)|(\d\?+))
are you understand the above code or explain for you?
Upvotes: 0
Views: 52