OT: PERL

At some point one notices perl is a write only language ?^)

Grant.

Reply to
omg
Loading thread data ...

That's all that's needed: In UltraEdit, parsing an HSpice library into PSpice format, it's now reduced to a find and replace (with PERL RegEx activated):

Find: '(\w.*)'

Replace: {\1}

Thus I can convert a file full of expressions in HSpice format (enclosed in single quotes) to PSpice format (enclosed by curly brackets) about as fast as you can blink :-)

Thanks to all who helped me decipher the less than clear PERL RegEx help !!! ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

character

that

Not at all. For that try APL.

Perl is not my favorite language, PCRE is fine for string bashing. = Trying to do the same with APL is a real monster.

YMMV

?-)

Reply to
josephkk

I like awk (gawk for GNU version), but use perl when more control, like handling signals and/or sockets, is needed.

Awk is named for the three authors, 'k' is for Kernigan of 'C' fame.

Perl can do anything, it seems. But it's difficult for a casual programmer to use effectively without some guidance.

To a different query, I use the Camel book (forgot the title) and the Perl cookbook (both O'Reilly) as references a decade ago.

Of course. So many standards to choose from!

Grant.

Reply to
omg

I don't need PERL per se, I just need to understand how to write regular expressions that confirm to PERL. My UltraEdit has PERL search and replace capability built-in. I'm gradually building my own expression cookbook ;-) ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Trying

Thanks for the confirmation, i had concluded that some posts up.

?-)

Reply to
josephkk

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.