Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
10-01-2011, 07:19 PM #1
- Join Date
- Oct 2011
- Thanked 0 Times in 0 Posts
Matching of two regular expressions.[C++]
"You are given two regular expressions R1 and R2 and should find minimal string S matching both. String consists of capital latin letters A..Z. Regular expression is word consisting of A..Z and * ? symbols. The symbol * corresponds to any word or empty word. The symbol ? corresponds to one letter.
Input Two lines with regular expressions R1 and R2, each line has less than 500 characters.
Output String S — one of the strings with minimal length matching both regular expressions. If string matching R1 and R2 does not exist, then output #."
I'm not quite familiar with regular expressions, and I will be grateful for any help with this task.