make 3 python regex expression to get "30.0K", "23.44 SOL", "43m" all dinamically the…
- User
make 3 python regex expression to get "30.0K", "23.44 SOL", "43m" all dinamically the string is Price: 🏷️ 30.0K Liquidity: 💧 $7.5K (23.44 SOL) Age: 🌿 43m
- Assistant
To extract the values "30.0K", "23.44 SOL", and "43m" dynamically from a given text using Python regex expressions, you can use the
remodule. Here's how you can design the regex patterns and use them:-
To extract "30.0K" (which seems to be the Fully Diluted Valuation (FDV)):
- Pattern: Look for a pattern following the "$" symbol within the FDV line.
-
To extract "23.44 SOL" (from the Liquidity section):
- Pattern: Find sequences followed by "SOL" within parenthesis.
-