I wonder if someone could shed some light on using a RegEx to extract some values.
I have a string that looks something like this:
$Aa37.33092,-2.9084$
- The string will always start and end with a dollar-sign.
- The two letters after the starting dollar-sign are irrelevant but will always be there.
- Two numerical values follows, separated by a comma.
- Both CAN be negative, but does not have to be.
- Both CAN have up to three digits before the dot and up to five digits after the dot (the actual number of digits is unknown until the string arrives)
Each value should then go into a unique variable in PowerShell for further processing, but I think I can cope with the rest. I just need some hints or pointers on how to extract these values.
^\$(\w{2})(-?\d+\.\d+),(-?\d+\.\d+)\$$Improved version of my previous pattern.