Posted: Tue Dec 23, 2003 10:22 pm
Indeed, but at least it seems less likely that there's anything about how I've recorded it that is affecting the outcome.Bob Hansen wrote:Reminder: It may be my macro, but it is using your original RegExexpressions.
I think you're forgetting that the replace operations work:Again, I think your Regex should probably be modified to deal with the trailing spaces.
- when performed manually
- when recorded as two separate macros (with the last replace recorded and executed separately)
- (re the last replace) when performed manually on the improperly re-formatted text after executing the macro
Also if you examine the expressions used, the only place where a trailing space is of any consequence (in the source text) is in the NAMEX lines - and that's not a problem in my source text nor in the test text (once they've been removed - easy enough to do for a couple of lines). Also, take a look at those regexes - I can't see how what you're suggesting can be done. The last replace is searching for that specific string: a single uppercase followed by a sequence of lowercase followed by a colon and space. Where's the relationship between that and a trailing space on the very last line of text?
I'd really like for you to try it out as per my previous post. Then tell me if you're not absolutely surprised that the macro fails to work because of a single trailing space on the last line and witness that removing it allows the macro to work (combined with the fact that after the macro has failed, executing the final replace manually *does* work). I was flabbergasted when I saw that - just adding and removing that trailing space makes all the difference.I don't think it is a bug,
Well at least I can agree with you on that! :)and I don't think it is OS sensitive.
As i pointed out in my last post, the only requisite in using the posted sample text is to remove any trailing spaces from the NAMEX lines. Once that's done then you only need play with the last line by adding and removing the trailing space on it and/or a trailing blank line. Try it then look at those expressions and tell me I'm missing something? (And again - when the macro fails, do that last replace manually and see how it works, then tell me *why* it works manually - or even when recorded as a separate macro - but won't work as part of the original macro). And then tell me again why you think it's not a bug? :)But you are closer to the source data and can work that out better than remote forum users with sample code.
Thanks for the other info.
fs