2
votes
1answer
71 views

Can I make a regex array to iterate through in C++?

I have to check a string to various regular expressions in C++. Up to now, I've done this using something similar to this: regex regex_a (".."); string rewrite_a = "($1/$2)"; regex regex_b (".."); ...
1
vote
1answer
90 views

Remove identical array items [closed]

I have the following piece of code... public function setEmailAddresses() { $this->matches = array(); $this->matchRegex = '/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}/'; ...