Hello Jonathan, As the 14:21 GMT -0500 on Wednesday, October 1, 2003 deadline loomed, Jonathan Angliss [JA] madly pounded out:
JA> Now for a slight alteration. Some of the reports are coming in with: JA> The message WAS NOT delivered to: JA> <[email]>: JA> I assume this will require an extension to the query, Not really. It depends on what information you want. If you want to extract the WILL BE vs. WAS NOT, then we need to do a tiny bit of work. If we don't care about that, then we can probably afford to shortcut the problem. As you noticed: JA> as I tried a simple (WILL BE|WAS NOT), and of course, it returns JA> the WAS NOT part as the email address. The only problem with this solution is that you changed subpattern 1 to some text we don't care about. The problem is that we're using a shortcut with the %RegexpText. You can keep this regexp, but then we need to change the %Regexptext macro to 3 macros. That is the better solution if you think you might want to extract the delivery status at some point. However, if you know that you won't want any other info, then the easiest is to simply replace the words "WILL BE" to ".*?" (no quotes). That just means any text will be matched at that point and not put into a subpattern. It would look like: %_Email='%- %RegexpText="(?im-s)^\s*The message.*?delivered to:\s*\n\s*<(.*?)>"'%- Note I've also changed the subpatterning to remove the angular brackets as per your other message. See that reply for details. JA> Would it be easier to add in an %IF statement? You could do that, but it is probably overkill. These relatively simple regexps have more than enough flexibility to do what you want. -- Thanks for writing, Januk Aggarwal ________________________________________________________ http://www.silverstones.com/thebat/TBUDLInfo.html
