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 812343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:11:20+00:00 2026-05-15T01:11:20+00:00

I need a regexp to match something like this, ‘text’ | ‘text’ | …

  • 0

I need a regexp to match something like this,

‘text’ | ‘text’ | … | ‘text'(~text) = ‘text’ | ‘text’ | … | ‘text’

I just want to divide it up into two sections, the part on the left of the equals sign and the part on the right. Any of the ‘text’ entries can have “=” between the ‘ characters though. I was thinking of trying to match an even number of ‘s followed by a =, but I’m not sure how to match an even number of something.. Also note I don’t know how many entries on either side there could be. A couple examples,

’51NL9637X33′ | ‘ISL6262ACRZ-T’ | ‘QFN'(~51NL9637X33) = ’51NL9637X33’ | ‘ISL6262ACRZ-T’ | ‘INTERSIL’ | ‘QFN7SQ-HT1_P49’ | ‘()’

Should extract,
’51NL9637X33′ | ‘ISL6262ACRZ-T’ | ‘QFN'(~51NL9637X33)
and,
’51NL9637X33’ | ‘ISL6262ACRZ-T’ | ‘INTERSIL’ | ‘QFN7SQ-HT1_P49’ | ‘()’

‘227637’ | ‘SMTU2032_1’ | ‘SKT W/BAT'(~227637) = ‘227637’ | ‘SMTU2032_1’ | ‘RENATA’ | ‘SKT28_5X16_1-HT5_4_P2’ | ‘()’ :SPECIAL_A =’BAT_CR2032′, PART_NUM_A=’202649′

Should extract,
‘227637’ | ‘SMTU2032_1’ | ‘SKT W/BAT'(~227637)
and,
‘227637’ | ‘SMTU2032_1’ | ‘RENATA’ | ‘SKT28_5X16_1-HT5_4_P2’ | ‘()’ :SPECIAL_A =’BAT_CR2032′, PART_NUM_A=’202649′

Also note the little tilda bit at the end of the first section is optional, so I can’t just look for that.

  • 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-15T01:11:20+00:00Added an answer on May 15, 2026 at 1:11 am

    Actually I wouldn’t use a regex for that at all. Assuming your language has a split operation, I’d first split on the | character to get a list of:

    '51NL9637X33'
    'ISL6262ACRZ-T'
    'QFN'(~51NL9637X33) = '51NL9637X33'
    'ISL6262ACRZ-T'
    'INTERSIL'
    'QFN7SQ-HT1_P49'
    '()'
    

    Then I’d split each of them on the = character to get the key and (optional) value:

    '51NL9637X33'           <null>
    'ISL6262ACRZ-T'         <null>
    'QFN'(~51NL9637X33)     '51NL9637X33'
    'ISL6262ACRZ-T'         <null>
    'INTERSIL'              <null>
    'QFN7SQ-HT1_P49'        <null>
    '()'                    <null>
    

    You haven’t specified why you think a regex is the right tool for the job but most modern languages also have a split capability and regexes aren’t necessarily the answer to every requirement.

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

Sidebar

Ask A Question

Stats

  • Questions 505k
  • Answers 505k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer They're not radian values but radius values. See e.g. here… May 16, 2026 at 3:22 pm
  • Editorial Team
    Editorial Team added an answer Do you really need it to be a message box?… May 16, 2026 at 3:22 pm
  • Editorial Team
    Editorial Team added an answer This seems to be by design : http://www.pagedesigners.co.nz/2009/12/asp-net-mvc-datetime-binding-and-culture-unaware-urls/ And the… May 16, 2026 at 3:22 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I need to create a regexp to match strings like this 999-123-222-...-22 The string
I need a function to return all matches of a regexp in a string
Using Damian Conway's Regexp::Grammars , I'm trying to match different balanced quoting ( 'foo'
I need to find, process and remove (one by one) any substrings that match
I am new to regexp in php. I am just trying to do a
I have an emacs buffer containing the text a1b2c3 using the regexp-builder, i create
I need a regex that will match on a price or amount. It should
I have a set of strings and I need to find all all of
i have a notes column which contains text and has an id within the
EDIT : This question doesn't really make sense once you have picked up what

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.