Skip to content

Suggestions for 'replace' cheat sheet #1

Description

@ostephens

Just some suggestions - feel free to ignore or use as you see fit!

  • In the line Replace a single character (x) with several other characters (vwxyz) the GREL should be either value.replace(" & ", " and ") or value.replace("&", "and"). The current GREL would lead to extra spaces in the final result
  • In the line Remove more than one space suggest that the final column reads Removes more than three spaces as this is the result of the specific GREL used. Alternatively a regular expression replace could be used to replace any number of multiple spaces value.replace(/\s+/, "")
  • In the line Replace a single character (x) with several other characters (vwxyz) the GREL expression syntax has a trailing space after char
  • In the line Replace several characters (abcde) with several others (vwxyz) the GREL expression syntax has a trailing space after chars
  • In the last two lines demonstrating the use of regular expressions the formula in the GREL expression syntax column should use generic entries for the regular expression rather than the specifics (which are used in the following column). e.g. value.replace(/_regular expression_/,"newchars") and value.replace(/^regular expression/,"newchars")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions