Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: AUTO_LISP question? #965

Closed
veripoolbot opened this issue Sep 22, 2015 · 2 comments
Closed

Question: AUTO_LISP question? #965

veripoolbot opened this issue Sep 22, 2015 · 2 comments
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Ming-Tuo Chin
Original Redmine Message: 1729 from https://www.veripool.org


Hi, there,

Is there a way to define a AUTO_LISP to chop the suffix no matter what it is? The following is my current AUTO_LISP, it only cuts off the suffix "_sig". I was wondering can it extend to chop any suffix?

/* AUTO_LISP(defun chop_sig (strg)
(string-match "\(.*\)_sig" strg)
(match-string 1 strg)) */

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-09-22T18:18:14Z


What are you calling a suffix? Anything after a _? Just do that with the regexp.

/* AUTO_LISP(defun chop_sig (strg)
(string-match "\([^_]\)_." strg)
(match-string 1 strg)) */

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Ming-Tuo Chin
Original Date: 2015-09-22T20:31:21Z


The "suffix" here I mean is the last word separated by '_'. Like a signal a_b_c_d, its suffix is _d. And suffix of a_b is _b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant