I am trying to highlight variables and keywords in a code snippet using jQuery. Suppose, I have a java snippet like this,
public class abc {
public static void main(String args[]) {
int count = 0;
}
}
I am using button called "Variable" for variables and "Keyword" for reserved keywords. Is there any method for it? Or should I be using Regex?