> -----Original Message----- > From: Gerry Shaw [mailto:[EMAIL PROTECTED] > Sent: donderdag 13 maart 2003 18:53 > To: Arjen Poutsma > Cc: Nant-Developers (E-mail) > Subject: RE: [nant-dev] Substring?
[snip] > I haven't followed the discussion about substring too closely > but Arjen's > <regex> task looks like a good place to start. Ok, I'll send it to the list later today. Just polishing it up a bit at the moment ;). > How about changing the 'input' attribute to 'fromstring'. > This way it > leaves the door open for the task so that input could come > from a file, > fileset or other sources. I think it's best to use a combination of the loop and regex tasks for cases where input is to be obtained from files, lines in files or filesets. (The reason why loop uses its own item="File" mechanism instead of using filesets eludes me. It should be corrected, IMHO). So, what Griffin wanted (extracting the filenames of xml files) can be accomplished as such: <foreach item="File" in="${xml.dir}" property="xml.filename"> <regex pattern="^(?'filename'.*).xml" input="${xml.filename}"/> <style style="${xsl.dir}/StyleSheet.xsl" in="${filename}.xml" out="${filename}.html"/> </foreach> Best, Arjen ------------------------------------------------------- This SF.net email is sponsored by:Crypto Challenge is now open! Get cracking and register here for some mind boggling fun and the chance of winning an Apple iPod: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en _______________________________________________ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers