Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Further to your updated OP: Why are you substituting newlines with spaces? The first approach given in my reply above, the one based on slurping the entire file (as you seem now to be doing), depends on having all newlines preserved. If your final text needs to be without newlines, I think the best time to get rid of them would be after all changes to the text have been made because those changes are all defined (or were defined in the original Original Post) in terms "lines", i.e., with reference to newlines.
However, also note that if the "random amount of other text" preceding the 'b' in a trigger line may contain any whitespace, then the Update: When updating a post, please do not destroy original content; instead, indicate defunct content as such (e.g., with <strike> ... </STRIKE> tags or in a brief note). Likewise, indicate added content in some way. The Golden Rule: Thou shalt not destroy the context of previous replies. Please see How do I change/delete my post?. Give a man a fish: <%-{-{-{-< In reply to Re: Regex with condition
by AnomalousMonk
|
|