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

  • Home
  • SEARCH
  • 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 6849559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:00:24+00:00 2026-05-27T01:00:24+00:00

I would like to use regular expression to check if my string have the

  • 0

I would like to use regular expression to check if my string have the format like following:

mc_834faisd88979asdfas8897asff8790ds_oa_ids
mc_834fappsd58979asdfas8897asdf879ds_oa_ids
mc_834faispd8fs9asaas4897asdsaf879ds_oa_ids
mc_834faisd8dfa979asdfaspo97asf879ds_dv_ids
mc_834faisd111979asdfas88mp7asf879ds_dv_ids
mc_834fais00979asdfas8897asf87ggg9ds_dv_ids

The format is like mc_<random string>_oa_ids or mc_<random string>_dv_ids . How can I check if my string is in either of these two formats? And please explain the regular expression. thank you.

That’s a string start with mc_, while end with _oa_ids or dv_ids, and have some random string in the middle.

P.S. the random string consists of alpha-beta letters and numbers.

What I tried(I have no clue how to check the random string):

/^mc_834faisd88979asdfas8897asff8790ds$_os_ids/
  • 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-05-27T01:00:25+00:00Added an answer on May 27, 2026 at 1:00 am

    Try this.

    ^mc_[0-9a-z]+_(dv|oa)_ids$
    
    ^           matches at the start of the line the regex pattern is applied to. 
    [0-9a-z]    matces alphabetic and numeric chars.
    +           means that there should be one or more chars in this set
    (dv|oa)     matches dv or oa
    $           matches at the end of the string the regex pattern is applied to. 
         also matches before the very last line break if the string ends with a line break.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use UltraEdit regular expression (perl) to replace the following text
Suppose I have the following regular expression in Python and I would like to
I would like to use Vim to match a regular expression and perform a
I would like to use a regular expression to match all words with more
I would like to use a regular expression to mask all but the first
I would like to use a regular expression to extract bind variable parameters from
I am horrible with Regex stuff. I would like to use a regular expression
I would like to use a Perl regular expression to match strings like this:
I would like to use regular expression to extract only @patrick @michelle from the
I have html eg below and would like to use regular expressions to change

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.