• 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. Custom IC SKILL
  3. Pattern Matching of Regular Expressions

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 142
  • Views 19523
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pattern Matching of Regular Expressions

archive
archive over 17 years ago

I’m studing this topic and I met problem to understand this example…
 
rexCompile("\\([a-z]+\\)\\.\\1")        => t
rexExecute("abc.bc")                    => t
rexExecute("abc.ab")                    => nil
 
It is not clear why the second case is nil and if I type:
 
rexCompile("\\([a-z]+\\)\\.\\1")        => t
rexExecute("abc.bc")                    => t
 
rexSubstitute( “debug: \\0" ) => debug: bc.bc
 
Why the result is bc.bc?
 
 \1 register should not point to abc?
 
Please, could you clarify me how it works? Where could I find accurate information as the cdsdoc is not clear on how registers work.
 
Giuseppe

 


Originally posted in cdnusers.org by Giuseppe Greco
  • Cancel
Parents
  • archive
    archive over 17 years ago

    Giuseppe,

    Looks like a bug. I don't think rexExecute("abc.bc") should return t either. Only "abc.abc" should return t.

    What seems to be happening is that \1 is incorrectly being stored as "bc", and that's why the first case returns t.

    You should contact customer support about this.

    Note that in IC61 you have the "pcre" functions which provide access to a [u]much [/u] more powerful regular expression parser/compiler etc - so I'd take a look at that.

    Regards,

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • archive
    archive over 17 years ago

    Giuseppe,

    Looks like a bug. I don't think rexExecute("abc.bc") should return t either. Only "abc.abc" should return t.

    What seems to be happening is that \1 is incorrectly being stored as "bc", and that's why the first case returns t.

    You should contact customer support about this.

    Note that in IC61 you have the "pcre" functions which provide access to a [u]much [/u] more powerful regular expression parser/compiler etc - so I'd take a look at that.

    Regards,

    Andrew.


    Originally posted in cdnusers.org by adbeckett
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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