-5

I've a variable of type String.

String a = "<html><head><title></title></head><body>&nbsp;${member.activation_date}&nbsp;&nbsp;${member.activationdate}&nbsp;</body></html>";

Now I want to fetch all the words starting with the $ and ending with a, I have a regular expression which works like a charm (\$\{\w+\.\w+\}) but is there any other better way to do so which can save me the second \w to make it efficient.

Majid Ali Khan
  • 701
  • 8
  • 13

1 Answers1

1

Since I didn't get my desired answer rather got multiple downvotes, I am accepting this one... (\$\{\w+\.\w+\})
Thank you all for your answers.

Majid Ali Khan
  • 701
  • 8
  • 13