Loading ...
Sorry, an error occurred while loading the content.

Re: [list_b] [Clip] Is there a way to use regular expressions in StrReplace?

Expand Messages
  • Alec Burgess
    Grant: ^!replace [! & ( ) * +,- ./:; ?@ [ ] ^` { | }~ )] _ rwsa Note: not all of the characters above inside the [ and ] that have it, actually
    Message 1 of 1 , May 2 4:34 PM
    • 0 Attachment
      Grant:

      ^!replace "[!"\&\(\)\*\+,- \./:;<=>\?@\[\\\]\^`\{\|\}~ \)]" >> "_" rwsa

      Note: not all of the characters above inside the [ and ] that have it,
      actually require the escaping "\" before them but it doesn't hurt.

      I just copied your list to the find/replace dialog after turning on Regexp
      and Notetab automatically quotes all characters that ever need it. Either
      use it as is with Find/Replace or make a one line clip. (I can never
      remember which the right set of options is to only do a selected range -
      probably "rws" instead of "rwsa".)

      Regards ... Alec
      --

      ---- Original Message ----
      From: "Grant Botes" <grantbotes@...>
      To: <ntb-Clips@yahoogroups.com>
      Sent: Friday, May 02, 2003 03:52
      Subject: [list_b] [Clip] Is there a way to use regular
      expressions in StrReplace?

      > Hi all
      >
      > I need some more help, please.
      >
      > I want to find a way to replace all word delimiters (e.g.
      > !"&()*+,- ./:;<=>?@[\]^`{|}~ ) in a selection with the
      > underscore "_"
      > character. Is there a way to do this easily?
      >
      > I had thought of using regular expressions with
      > StrReplace rather
      > than using umpteen StrReplace's to remove all of the
      > possible
      > characters one at a time. Can it be done? I haven't tried
      > it yet 'cos
      > I'd sort of like to know whether its do-able beforehand.
      >
      > The question has arisen because I find the HTML Help
      > compiler doesn't
      > like the word delimiter characters in table of contents
      > and index
      > file entries, and fails to execute certain hyperlinks
      > that contain
      > them.
      >
      > Thanks and regards,
      > Grant Botes
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      > http://docs.yahoo.com/info/terms/
    Your message has been successfully submitted and would be delivered to recipients shortly.