Contrary to popular belief, word processors go about their business in the wrong way. You should have no trouble running your source files through grep, sed, awk, wc or whatever you choose.
Structure is more important than appearance.
You cannot work directly on Word or WordPerfect files due to their binary nature. You eventually get releases of a product that no longer willingly load older binaries. Cross-platform support among word processors is an ongoing issue. While support for these features is often present, it's not particularly sophisticated or robust. You can use any simple editor to create a web page.