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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:21:41+00:00 2026-05-11T17:21:41+00:00

I need a reg exp that will parse something like- 2 * 240pin where

  • 0

I need a reg exp that will parse something like-

"2 * 240pin"

where the * can be either the regular star or unicode char \u00d7 or just an x. This is what I have but its not working:

multiple= r'^(\d+)\s?x|*|\\u00d7\s?(\d+)(\w{2,4})$'
multiplepat= re.compile(multiple, re.I)
print multiplepat.search(u'1 X 240pin').groups()

returns

multiplepat= re.compile(multiple, re.I)
File "C:\Python26\lib\re.py", line 188, in compile
return _compile(pattern, flags)
File "C:\Python26\lib\re.py", line 243, in _compile
raise error, v # invalid expression
error: nothing to repeat
  • 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-11T17:21:41+00:00Added an answer on May 11, 2026 at 5:21 pm

    You need to escape the * as it is a quantifier in the context you use it. But you could also use a character class. So try this:

    ur'^(\d+)\s?[x*\u00d7]\s?(\d+)(\w{2,4})$'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a regular expression that I can use in VBScript and .NET that
I need help with a regular expression that will find matches in the strings
What I need is something that will match words that contain special symbols (except
I need to find a reg ex that only allows alphanumeric. So far, everyone
Need to an expression that returns only things with an I followed by either
Need a function like: function isGoogleURL(url) { ... } that returns true iff URL
I need to write a query using MYSQL REGEXP that will find me rows
How do i do a regular expression that will allow everything except !@$%^&*()_+={}[]|:;'<>,.?/ (If
Can someone show me a regex that will remove the page part from a
Need a function that takes a character as a parameter and returns true if

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.