Re: regex to add trailing slash if doesn't end in html

2010-05-13 Thread Shlomi Fish
On Thursday 13 May 2010 07:05:31 C.DeRykus wrote: > On May 12, 1:15 pm, fulls...@me.com (Brian) wrote: > > Hi all. I think this should be relatively simple but i just can't figure > > it out. I have a list of files and directories. The files will all end > > in .html. All the remaining elements in

Re: regex to add trailing slash if doesn't end in html

2010-05-13 Thread C.DeRykus
On May 12, 1:15 pm, fulls...@me.com (Brian) wrote: > Hi all. I think this should be relatively simple but i just can't figure it > out. I have a list of files and directories. The files will all end in .html. > All the remaining elements in the list are assumed to be directories. I'm > looking f

Re: regex to add trailing slash if doesn't end in html

2010-05-12 Thread John W. Krahn
John W. Krahn wrote: Brian wrote: my @pages = ( "lc1", "lc2/", "lc3/index.html", "lc4/", "lc5", ); map {s/(some regex here)/$1\//} @pages; $ perl -le' my @pages = ( "lc1", "lc2/", "lc3/index.html", "lc4/", "lc5", ); print "@pages"; s|(? $ perl -le' my @pages = ( "lc1", "

Re: regex to add trailing slash if doesn't end in html

2010-05-12 Thread John W. Krahn
Brian wrote: Hi all. Hello, I think this should be relatively simple but i just can't figure it out. I have a list of files and directories. The files will all end in .html. All the remaining elements in the list are assumed to be directories. I'm looking for a regex to add a trailing slash t

Re: regex to add trailing slash if doesn't end in html

2010-05-12 Thread Shawn H Corey
On 10-05-12 04:15 PM, Brian wrote: Hi all. I think this should be relatively simple but i just can't figure it out. I have a list of files and directories. The files will all end in .html. All the remaining elements in the list are assumed to be directories. I'm looking for a regex to add a tr

regex to add trailing slash if doesn't end in html

2010-05-12 Thread Brian
Hi all. I think this should be relatively simple but i just can't figure it out. I have a list of files and directories. The files will all end in .html. All the remaining elements in the list are assumed to be directories. I'm looking for a regex to add a trailing slash to the directories if on