Some more pointers on the use of regular expressions...

http://www.openofficetips.com/blog/archives/2005/11/regular_express.html

On 1/26/06, beaton <[EMAIL PROTECTED]> wrote:
>
> Dear OpenOffice.org,
>
> Here are some observations about Calc v2.0.1.
>
> Regular Expression ("regex") Replace Problem
> --------------------------------------------
> Here's a suggestion for improving "Edit menu > Find and Replace... > More
> Options > Regular expressions".
>
> Good: Regular expressions, such as ([0-9])([A-Z]), are supported in the
> "Search for" field.
> Bad: Calc doesn't support regex in the "Replace with" field.
>
> In other programs that support "regex replace", text that is matched by
> the
> sub-expressions in parenthesis can be used in the replace expression.
> For example, suppose a spreadsheet cell contains the string "2A".
> Suppose the find expression is: ([0-9])([A-Z])
> and suppose the replace expression is: \2\1
> Resulting text entered into the cell by Calc v2.0.1 is: "\2\1"  <<==
> Useless result!
> Resulting text entered into cell if "regex replace" was implemented
> properly: A2 (ie. characters are swapped).
>
> Perhaps the Calc Software Architect decided not to implement regex replace
> because it would produce unexpected results if used by inexperienced
> users.
> To make it safer, you could give users the options of:
> - Changing background color of cells that were changed (or change other
> formatting such as bold text),
> - Selecting all cells that were changed in the most recent replace
> operation (so that users can tab from cell to cell, and visually check
> changes. This would have the added benefit of letting users change cell
> formatting after the replace was complete.
> - Make the change undoable
>
> Find and Replace, Range Problem
> -------------------------------
> The "Current selection only" checkbox is like a booby trap waiting to
> destroy data.
> Suppose I select a range of cells, then I turn on "Current selection
> only",
> then I click on a single cell -- Calc turns off "Current selection only",
> and leaves it turned off, even when I select a new range of cells. If I
> don't notice this malicious behavior, my whole spreadsheet is changed.
> If I click [Find All], Calc doesn't confine the find operation to the
> range
> I selected, it does the whole spreadsheet.
> This is also true for the replace command.
> This is bad -- suppose I want to make changes to all matching cells in
> column D, and leave all other columns unchanged -- I can't do it.
> Suggestion: Get rid of the "Current selection only" checkbox. Follow the
> Excel standard: Search the whole spreadsheet if one cell is selected; if a
> range is selected, then confine the search to the range.
>
> Find and Replace, Wildcard Problem
> ----------------------------------
> Calc Find doesn't support wildcards.
> Suppose a cell contains Abc
> Find A* doesn't find anything.
> Suggestion: Implement wildcard searches. The 99.9% of the population who
> don't understand regex's will be grateful.
>
> User Interface Inconsistency
> ----------------------------
> The Find dialog box has a "More Options" button. When you click it, it
> changes to "Less Options"
> "Data menu > Filter > Standard Filter" has a "More" button. When you click
> it, it doesn't change to "Less".
> Suggestion: Make button names consistent. Is there anything wrong with
> using Excel's [Options >>] and [<< Options]?
>
> Checkboxes vs. Radio Buttons
> ----------------------------
> Radio buttons are normally used for mutually exclusive choices, and
> checkboxes are used for choices that are not mutually exclusive .
> The Find dialog box violates these standards.
> "Regular expression", "Similarity search" and "Search for Styles" are
> mutually exclusive options and should be represented by radio buttons, not
> check boxes.
> A fourth radio button, "Wildcard search" should be added.
> A minor nitpick: If Calc's dialog boxes standardize on "sentence case",
> then "Search for Styles" should be "Search for styles".
> If you can, you should draw a faint line around the set of radio buttons,
> to give the user a visual cue to the set of alternatives.
>
> Data Filters
> ------------
> Data filters don't do anything.
>
> Regards,
> Don Beaton
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
My OpenOffice Calc Website
http://www.openofficetips.com

Reply via email to