cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How to replace numbers and symbols?

ptc-4604403
1-Visitor

How to replace numbers and symbols?

Hi.

Is there a somewhat resonable way to start with a complex nested objects like

argu.jpg

and end up with either of those

resu.jpg

which means that every number existing within becomes zero and every symbol (or string of symbols) becomes some placeholder symbol (I chose '*' for no particular reason).

How should I accomplish this?

ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald III
(To:ptc-4604403)

Pranas Pranas wrote:

Hi.

Is there a somewhat resonable way to start with a complex nested objects like

argu.jpg

and end up with either of those

resu.jpg

which means that every number existing within becomes zero and every symbol (or string of symbols) becomes some placeholder symbol (I chose '*' for no particular reason).

How should I accomplish this?

For values of "reasonable" ...

collab - 12 05 28 nested array element replacement 01.jpg

Stuart

View solution in original post

3 REPLIES 3
StuartBruff
23-Emerald III
(To:ptc-4604403)

Pranas Pranas wrote:

Hi.

Is there a somewhat resonable way to start with a complex nested objects like

argu.jpg

and end up with either of those

resu.jpg

which means that every number existing within becomes zero and every symbol (or string of symbols) becomes some placeholder symbol (I chose '*' for no particular reason).

How should I accomplish this?

For values of "reasonable" ...

collab - 12 05 28 nested array element replacement 01.jpg

Stuart

This, kind sir, is beyond good.

That would have taken me a long time...

StuartBruff
23-Emerald III
(To:ptc-4604403)

Pranas Pranas wrote:

This, kind sir, is beyond good.

That would have taken me a long time...

No worries. Although many people don't like it and go out of their way to avoid it, Recursion is your Friend with nested arrays (and lots of other things!).

Stuart

Announcements

Top Tags