How do you create a function to get the word after "class" only if it is not a quoted (by single or double, or any triple quotations) and if its spelled correctly (cannot get class d() )
"class hi()" > hi
"class hi(dff)" > hi
"class hi ( dff ) :" > hi
" class hi ( dff ) :" > hi
"class hi" > hi
"classf hi" > Nothing
"fclass hi" > Nothing
"'class hi(dd)'" > Nothing
'"class hi(dd)"' > Nothing
"'''class hi(dd)'''" > Nothing
'"""class hi(dd)"""' > Nothing
'"""\n\n\n\nclass hi(dd)\n\n\n\n"""' > Nothing
"'class' hi()" > Nothing
It is too hard to create using loops. If anyone can help that would be nice, thanks. This is pretty challenging,