Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Regular Expressions
  4. Employer Identification Number (EIN) Regex

Employer Identification Number (EIN) Regex

Scheduled Pinned Locked Moved Regular Expressions
regexhelptutorialquestion
4 Posts 2 Posters 12 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_15311149
    wrote on last edited by
    #1

    We are trying to create a new policy to detect Employer Identification Number (EIN) in MCAS. I'm very new to Regex so I need some help. We've tried the below regex and MCAS is showing me an error of: Capturing parenthesis not allowed in regular expression. Does anyone know how to convert the below regex to something without the capturing parentheses? Thanks! ([07][1-7]|1[0-6]|2[0-7]|[35][0-9]|[468][0-8]|9[0-589])-?\d{7}

    L 3 Replies Last reply
    0
    • M Member_15311149

      We are trying to create a new policy to detect Employer Identification Number (EIN) in MCAS. I'm very new to Regex so I need some help. We've tried the below regex and MCAS is showing me an error of: Capturing parenthesis not allowed in regular expression. Does anyone know how to convert the below regex to something without the capturing parentheses? Thanks! ([07][1-7]|1[0-6]|2[0-7]|[35][0-9]|[468][0-8]|9[0-589])-?\d{7}

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      To prevent (CapturingGroups), you can spec them as (?:NonCapturingGroups)

      1 Reply Last reply
      0
      • M Member_15311149

        We are trying to create a new policy to detect Employer Identification Number (EIN) in MCAS. I'm very new to Regex so I need some help. We've tried the below regex and MCAS is showing me an error of: Capturing parenthesis not allowed in regular expression. Does anyone know how to convert the below regex to something without the capturing parentheses? Thanks! ([07][1-7]|1[0-6]|2[0-7]|[35][0-9]|[468][0-8]|9[0-589])-?\d{7}

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        aa

        1 Reply Last reply
        0
        • M Member_15311149

          We are trying to create a new policy to detect Employer Identification Number (EIN) in MCAS. I'm very new to Regex so I need some help. We've tried the below regex and MCAS is showing me an error of: Capturing parenthesis not allowed in regular expression. Does anyone know how to convert the below regex to something without the capturing parentheses? Thanks! ([07][1-7]|1[0-6]|2[0-7]|[35][0-9]|[468][0-8]|9[0-589])-?\d{7}

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          To prevent (Capturing|Groups), you can spec them as (**?:**Non|Capturing|Groups)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups