Hey guys, it's me again. I was creating a "config" file to be used in all the documents in a project and one thing I wanted to do was "auto-anchor" titles.
I have titles like so: = An Awesome Heading = and I have the following preproc so far: %%!preproc: '^=+(.*?)=+$' '\g<0>[\1]' This gets me this far: = An Awesome Heading =[ An Awesome Heading ] I can easily modify the regex to remove the outside spaces: = An Awesome Heading =[An Awesome Heading] but that doesn't quite cover it. Is there a way to strip spaces (and other bad characters) from a section of a line. I have considered brute-forcing it but that isn't pretty and can only handle a set amount of words. %!preproc: '^=+\s*(\S*?)\s*(\S*?)\s*(\S*?)\s*(\S*?)\s*=+$' '\g<0>[\1\2\3\4]' This last one works but is super ugly. Does anyone have and suggestions? Thanks, Kevin
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ txt2tags-list mailing list https://lists.sourceforge.net/lists/listinfo/txt2tags-list
