Hi. I am trying to match a string:
"RemoveAcc $k: $v"
There are an arbitrary number of spaces between RemoveAcc and the two variables...Preferably I would like to store these to variables using $1 and $2 after the string is parsed, but I do not want to save the RemoveAcc part (that is just a flag). Here is my code:
elsif(my $rawRequest = checkForRequest("removea")){
if($rawRequest ne "DONT"){
my ($valid,$request) = CheckRequest($rawRequest);
#Only if there is a valid request that says delete do we delete the contact (using the email that we scrape from the request
if ($valid and ($request =~ (RemoveAcc .*\s)(\w+):(\w+)/)){
.......
...My program complains about this regex, and I am not familiar enough with them to troubleshoot myself. I don't understand shashes. If I don't need parenthesis around the whole $request = please let me know also...Thank you!