how do I extract the numbers from before and after a symbol in javascript?

I’m trying to get the number that is before a symbol and the number after the symbol.

Example:

String=ajdje782@29sjdjn

I want a variable with the number 782 and a variable with 29

The numbers can be any length and there can be any number of letters. The symbol may be between 3 or 4 different symbols.

I tried using for loops to find the start and end of each side and store them, but it got too complicated and I couldn’t understand it