• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. Case Command and Regular expressions

Stats

  • Replies 2
  • Subscribers 160
  • Views 12687
  • Members are here 0
More Content

Case Command and Regular expressions

phughes
phughes over 15 years ago

Hello,

Has anyone tried to use regular expressions in the case command. I am searching a folder for a series of gerber files and a list of them is created. I am then searching the list and depending on the file name I want to print a different description. I want to know if it is possible to use regular expressions as the lookup value. See the code below for an example of what I am trying to do.

(case art

            (rexMatchp("^assy_top" art)

                   fprintf(readme_fab "Assembly Top Gerber\n")

            t)

            (t

                   fprintf(readme_fab "Gerber\n")

            t)

)

Regards

Peter Hughes

Teradyne GmbH

  • Sign in to reply
  • Cancel
  • aCraig
    aCraig over 15 years ago

    Hi Peter.

     Try a cond statement

    cond(

        (rexMatchp("^assy_top" art)

            fprintf(readme_fab "Assembly Top Gerber\n")

        )

       ( t

           fprintf(readme_fab "Gerber\n")

        )

      )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • phughes
    phughes over 15 years ago

    Hello Craig,

    Thanks for the feedback. That was exactly what I needed.

    Regards

    Peter.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information