Re: [Boost-users] [Spirit-general] Pattern matching with boost

Anthony Foiani
Have you even tried my code?
Seth Heeren
FYI: that mail never seems to have arrived at my MUA... Perhaps it got lost for Alec too? FWIW, the webinterface I sometimes use doesn't seem to list your post either. I don't know the why's there, just thought I'd mention.
Drat. Thanks for the heads-up. And it seems that your message didn't go out over the boost-users list, either, although it did make it to spirit-general. Weird. Alec, I apologize for the snark in my latest message. When you replied to my later messages, but not to my original reply, I just assumed you had seen it and were ignoring it for some reason. Sorry about that.
Some corner cases to think about:
1. ... B. ...
+1 many good points!
Only a side effect of fixing my own stupid mistakes for many years! Best regards, Tony

Thank you all for your replies, I can see that each have been carefully though out and well documented :) Tkil: With new concepts such as this, I often have trouble explaining myself. This is the exact same problem as the initial one, merely with a simpler explanation. My current thinking sees what I am doing as being outside the scope of regex, so I am planning to address the problem using just standard C++. Problem[1] - Compare 3 strings of text, if follows pattern[2] return s1.substr(text1+number) else return "" [2] Pattern is: s1.substr(text1+number)==s2.substr(text1+number-2)==s3.substr(text1+number-4) std::string answer=analyse(std::string("He ode 1"), std::string("Ze ode 3zczvsfd"), std::string("e ode 5")); So in this case the answer would equate to: "e ode 1" It seems to me that the only way to do this would be: 1. Search the 3 std::string for number, store number, length of number and position in a data-structure 2. Check if number in s1 == 2-number in s2 == 4-number in s3 3. If it does, find and the Longest Common Substring which includes the number, return the s1.substr LCS found 4. Else return "" I am thinking to piece this together using just the stdlib (std::isdigit &etc)... what do you think? Thanks for all suggestions, Alec Taylor [1]: Note that this is the same problem as my initial one stated, but I think this time I have figured out a completely unambiguous method of explaining both the pattern, input data, and expected results.
participants (2)
-
Alec Taylor
-
Anthony Foiani