Python regex. Get the last word from a sequence

Question:

I have a line like this:
jsdata="l7Bhpb;_;CJWKh4 cECq7c;_;CJWKiA" data-ved="2ahUKEwjxq7L29Yr7AhWM7qQKHRABDVEQ2esEegQIGxAE">

I need to get the word CJWKiA.
But I don’t understand how to write it in the regex language.

My failed attempt:
jsdata=".+?;.+?"
This returns the entire string, including the word I need 🙁

I don’t understand how to get only CJWKiA word, I need something pattern like this:
jsdata="l7Bhpb;_;CJWKh4 cECq7c;_;(CJWKiA)"

There may be different words, I only need to get the last one

Asked By: Jerykso

||

Answers:

/jsdata="[^"]*;([^;"]*)"/gm

You can’t have double quotes in the attribute.

Answered By: Alichu
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.