• 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. How to search for and delete single end-of-line text characters...

Stats

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

How to search for and delete single end-of-line text characters.

joma
joma over 9 years ago

I have some code that searches for and replaces text but it falls over if it finds a single end of line character.

The problem comes from imported text files (add text > read from file) which have empty lines, after a line of headings for example. The character appears as a small triangle on screen but in Notepad++ it shows as ETX. The snippet of code that has the problem is

                 foreach(text_t l_text
                            if(rexMatchp("^MINIMUM TRACK WIDTH.*$" text_t->text)
                            then    track_xy = text_t->xy
                            axlDeleteObject(text_t)
                            ) ;end if
                         ) ; end foreach

and the error produced is:

E- *Error* rexMatchp: argument #2 should be either a string or a symbol (type template = "tS") - nil

I have tried various attempts with escape characters to cope with this without success,so I was wondering if anyone knows how to make a pass on a particular layer to delete all of these characters if they exist?

Many thanks,

  • Sign in to reply
  • Cancel
Parents
  • joma
    joma over 9 years ago
    Thanks, that works, just check if it is really text - simple when you know how :)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • joma
    joma over 9 years ago
    Thanks, that works, just check if it is really text - simple when you know how :)
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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