Jump to content

Using Wildcards in Find & Replace


SteveJustSteve

Recommended Posts

When using the "Find" command to replace a portion of a text string, wildcards don't seem to work when used in the replace field. For example: if I want to change multiple strings ranging elevations one of which something like TC= 13.50 to TC= 1413.5 to have the full elevation, I would think I could enter Find: ##.## and Replace: 14##.## But it doesn't work nor does other possible wildcards in Replace field. I'm on Civil 3D 2021 and could have swore this worked in a previous version... Am I using the wrong syntax or is there another way? Thank you.

Link to comment
Share on other sites

Welcome to the forum!

 

When you pull down the Search Options pane in the Find and Replace window, there's an option to "Use Wildcards." Toggle that on and you should get the behavior you expect.

Link to comment
Share on other sites

11 hours ago, CyberAngel said:

Welcome to the forum!

 

When you pull down the Search Options pane in the Find and Replace window, there's an option to "Use Wildcards." Toggle that on and you should get the behavior you expect.

No that option is already ticked. For instance:

 

Find: TC=*
Replace with: TC=14*

the result for me is:
TC=13.50 will now be TC=14*13.50

 

Let me give you another use case: An imported PDF has many SHX text strings, when the polylines are converted to mtext the decimal points in all the strings is not recognized (ex. TC 1499 94, TP 1501 44, ect.) So I need to replace the second space in the string with a period.

 

As far as I can tell, Wildcards are NOT able to used in the replace field as far as I can tell and that's a bummer.

Edited by SteveJustSteve
Link to comment
Share on other sites

This has always been a problem with regular expressions and replacement. You can use a wildcard match, but when you want to replace multiple wildcards, which match goes with which replacement?

 

There are add-ons out there that might do what you want, and of course Lee Mac has a deluxe find/replace wizard (which I can't find right now). The bottom line is that AutoCAD won't do exactly what you need to do.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...