• 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. numbered registers and regexp's

Stats

  • Replies 2
  • Subscribers 159
  • Views 892
  • Members are here 0
More Content

numbered registers and regexp's

archive
archive over 17 years ago

Hey gang,

In Perl matching segments can be captured from a regular expression into special numbered registers:

$refdes = "CA543A"  ;
$1 =~ /\([A-Z]+\)[0-9]+..*/  ;   $1 winds up containing "CA"

The SKILL manual says you can do the same but gives no examples of how to reference the numbered registers. Anyone try this before and/or have some examples?


TIA,

Chris Walters
local Cadence guru
()


Originally posted in cdnusers.org by kerchunk
  • Sign in to reply
  • Cancel
  • archive
    archive over 17 years ago

    Hi Chris,

    A snippet...

    rexCompile("\\([a-zA-Z]+\\)\\([0-9]+\\)")
    foreach(pin, pins
    pinNumber = pin ->number
    if(rexExecute(pinNumber) then
    loc = pin ->xy, x = car(loc), y = cadr(loc)
    vPin = list(y, rexSubstitute("\\1")), hPin = list(x, rexSubstitute("\\2"))

    Cheers, Dave


    Originally posted in cdnusers.org by Dave Elder
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • archive
    archive over 17 years ago

    Thanks for the tip Dave, works like a charm!

    Once again I bow to the power of the almighty List!


    Thx again,

    CASE CLOSED

    Chris Walters
    local Cadence guru
    ()


    Originally posted in cdnusers.org by kerchunk
    • 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