How do you make use of regex within a variable?
Lets say I have a generated variable that looks like this:
$mytext = 1a2b3c4d
I want a way to take just the first 6 characters and use it as another variable
$mytest2 = first 6 characters of $mytext
So something like? /^\w\w\w\w\w\w/