On Jan 5, 2007 Colin Eyre wrote: > I am using a GREP to change blocks of text like the sample below (from Word) > to a HTML formatted list > > Word text: > > Some balconies are covered by thatched roofing while some are open > Suite upgrades available on request at a supplement > 4 restaurants offering a wide variety of cuisine, 2 bars > Stunning outdoor swimming pool with jacuzzi, sun loungers and umbrellas > > > > GREP used: > > Search for: > ([\t]+)([a-zA-Z0-9]+)([^\r]+) > > > Replace with: > <LI>\2 \3</LI> > > > > Resulting text: > <LI>Some balconies are covered by thatched roofing while some are open</LI> > <LI>Suite upgrades available on request at a supplement</LI> > <LI>4 restaurants offering a wide variety of cuisine, 2 bars</LI> > <LI>Stunning outdoor swimming pool with jacuzzi, sun loungers and > umbrellas</LI> > > > Trouble is I want to add a <UL> and </UL> at the beginning and end of the > block so its correctly formatted and avoids any manual tagging. All efforts > I have tried so far puts the<UL> and </UL> on every line. Some text blocks > are 4 lines while other may be 6 or more. Has anyone any ideas. All help > would be greatly appreciated.
Hi I hope I understand the question. In the find field: (<LI>.+</LI>\r)+ In the replace field: <UL>&</UL> Then "Replace All" for me puts <UL> tag around a series of lines beginning and ending with <LI> tag. Someone may come up with a way to do it all "in one" which would be rather cool. I think this can be done but my brain cell hasn't totally warmed up yet :) -- Patrick <http://www.patrickjames.me.uk> -- ------------------------------------------------------------------ Have a feature request? Not sure the software's working correctly? If so, please send mail to <[EMAIL PROTECTED]>, not to the list. List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml> List archives: <http://www.listsearch.com/BBEditTalk.lasso> To unsubscribe, send mail to: <[EMAIL PROTECTED]>
