Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8609793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:58:00+00:00 2026-06-12T03:58:00+00:00

Users in my application will use the regex to specify which file(s) the application

  • 0

Users in my application will use the regex to specify which file(s) the application should take and which it should exclude, e.g. include files matching foo.*\.txt

However sometimes the filter will need to use value that can only be known by the application at runtime. For example, if the filter is foo[SPECIALVALUEHERE].*\.txt and the special value happens to be bar, the actual filter will be foobar.*\.txt

Which characters can be used for specifying the [SPECIALVALUEHERE]? I guess to avoid ambiguity, it would need to be not a special/reserved character in regex, and not a character that would occur in a file. Another requirement from the customer is that it must be one (or at most two or three) characters only, so stuff like %SPECIALVALUE% is out of the question.

Any suggestion which character or character combination can I use for this purpose.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:58:02+00:00Added an answer on June 12, 2026 at 3:58 am

    On windows you can use for example = which is not a special character in regex but is not allowed in filenames (here a table of characters that can’t be used in windows filenames). You can then replace the = with what you need.

    Otherwise on unix systems it is quite a mess as any byte sequence can be part of the filename without restrictions, here a reference question on serverfault, so, even if language agnostic, you should at least decide on which systems you are going to use the regex.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that will mail users attachments of text files. Receiving users
I have a silverlight application which users will be running in various time zones
I want to build an application which will use a lot of data, trying
I'm creating a new web application which will use a bunch of Data Access
I'm creating a web application that will use multiple types of users (e.g. Admin,
In my web application I will have users, each user will have albums, and
I am developing a web application where users will be uploading a large number
I'm writing an application wherein users will sometimes make orders through it. I want
Building an iPhone OS application that will allow users to anonymously post information to
I'm writing an application that will add users to Active Directory. I'm trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.