#!/bin/sh
# $Id: striphelpids,v 1.2 2000/09/07 03:52:56 gregnoel Exp $
# small script to strip wxhelp IDs from latex source

exec sed -e 's/\(^.*\\part{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\chapter{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\section{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\subsection{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\subsubsection{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\paragraph{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\part\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\chapter\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\section\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\subsection\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\subsubsection\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' \
	-e 's/\(^.*\\paragraph\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' ${1+"$@"}
