+ Reply to Thread
Results 1 to 3 of 3

Regular expression to match set of characters

  1. #1
    Forum Contributor
    Join Date
    03-11-2021
    Location
    india
    MS-Off Ver
    365
    Posts
    154

    Regular expression to match set of characters

    Hello,

    If you save out an Outlook email (.msg) file, then it'll be saved with the subject as the file name but with any illegal file characters replace by an underscore.

    Illegal characters: \/:*?"<>|

    For example, and email with the subject Re: Your important data 18/05/2022
    will be saved as Re_ Your important data 18_05_2022.msg

    I'm trying to match file names with window captions and this causes a problem because I don't know which character and underscore represents.


    Is there a regular expression I could use to match the underscores in the file name with any of the illegal characters, or the underscore itself?

  2. #2
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,225

    Re: Regular expression to match set of characters

    Please Login or Register  to view this content.
    There are other characters in the commented out line that may be present in the filename, but may cause problems (on other systems).

    Artik

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,536

    Re: Regular expression to match set of characters

    Quote Originally Posted by Mingeita View Post
    Is there a regular expression I could use to match the underscores in the file name with any of the illegal characters, or the underscore itself?
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Return Regular Expression match to array
    By clams in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-15-2021, 12:00 PM
  2. [SOLVED] Regular expression with Cyrillic characters
    By Vixx1 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-10-2019, 05:47 AM
  3. [SOLVED] Help with VBA Regular Expression
    By noboffinme in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-13-2019, 12:16 AM
  4. Regular Expression Help
    By wwconslt in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-18-2017, 10:33 PM
  5. [SOLVED] Regular expression
    By chief_abound in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-10-2015, 10:59 PM
  6. Regular expression
    By Gourav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2014, 03:23 PM
  7. [SOLVED] Regular Expression
    By Kvramana in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 05:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1