[Webchange-list] New version: 2.95.26 -> Change case in search and replace

Vince M Hudd vince at softrock.co.uk
Wed Apr 4 15:07:19 BST 2012


I've just uploaded the latest version of WebChange, version 2.95.26

Free users can obtain it from: http://www.webchange.co.uk

Paid users can obtain it from: http://riscos-users.webchange.co.uk

This version adds a case conversion directive the the find and replace
operation, whereby the case of matched wildcards can be changed.

This is achieved by including a + (upper case) or - (lower case) character
in the sequence indicating the inclusion of a matched wildcard, immediately
after the wildcard character and before the match number.

In other words, to change the first matched wildcard to upper case, you
would use *+0; (whereas without the case conversion, it would be *0;) and to
change the fourth matched single character wildcard to lower case, you would
use ?-3; (whereas without the case conversion, it would be ?3;)

As a simple example:

If you had html that looked like this:

----8<----
<html>
 <head>
  <title>Test Page</title>
 </head>
 <body>
  <h1>Title 1</h1>
  <p>Some text
  <h1>Title 2</h1>
  <p>Some text
 </body>
</html>
----8<----

Entering the following in the relevant fields in WebChange's front end:

 Replace: <h1>*</h1>
 With:    <h1>*+0;</h1>

And clicking 'Process' would result in:

----8<----
<html>
 <head>
  <title>Test Page</title>
 </head>
 <body>
  <h1>TITLE 1</h1>
  <p>Some text
  <h1>TITLE 2</h1>
  <p>Some text
 </body>
</html>
----8<----

-- 
Soft Rock Software:                   http://www.softrock.co.uk
Vince M Hudd:                         http://misc.vinceh.com/about-vinceh/
RISCOSitory:                          http://www.riscository.com



More information about the Webchange-list mailing list