Ok great I'll use my workaround until the new release :-P -- Emil
-----Original Message----- From: d...@lonewolf.com [mailto:d...@lonewolf.com] On Behalf Of daniel.kl...@cfengine.com Sent: tisdag den 13 april 2010 17:47 To: Assarsson, Emil Cc: help-cfengine Subject: Re: matching a new [section] or EOF with select_end in a select_region body If you leave off the "select_end", it will match from the select_start to the end of file. If you have both a select_start and a select_end, then it will match between those - and in a recent patch, it will also allow EOF to match the end. You'll need the newer code, though... -Dan > Hi, > > Does anyone have a solution to match the EOF if there are no more sections in > a file? > > This body is suggested in the documentation but it doesn't handle EOF. > ----- > body select_region MySection(x) > { > select_start => "\[$(x)\]"; > select_end => "\[.*\]"; > } > ----- > > My current solution is to add another "empty" section in the file... it works > in my case (smb.conf) but may be a problem with other. I need to add some st > atements to make sure it is the last line. Suboptimal. > > > Best regards > > Emil Assarsson > Sony Ericsson Mobile Communications AB > > "The information in this email, and attachment(s) thereto, is strictly confid > ential and may be legally privileged. It is intended solely for the named rec > ipient(s), and access to this e-mail, or any attachment(s) thereto, by anyone > else is unauthorized. Violations hereof may result in legal actions. Any att > achment(s) to this e-mail has been checked for viruses, but please rely on yo > ur own virus-checker and procedures. If you contact us by e-mail, we will sto > re your name and address to facilitate communications in the matter concerned > . If you do not consent to us storing your name and address for above stated > purpose, please notify the sender promptly. Also, if you are not the intended > recipient please inform the sender by replying to this transmission, and del > ete the e-mail, its attachment(s), and any copies of it without, disclosing i > t." > > > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine