Jump to content
Sign in to follow this  
hownow

text parsing question exchanging spaces for - and removing a ,

Recommended Posts

I have another example of a file I need to parse.

 

All Saints' Episcopal Church, Brighton Heights, PA    

this is the way it looks

 

But If I change the ending of it I can do what I need to do.

 

http://www.episcopalchurch.org/parish/all-saints-episcopal-church-brighton-heights-pa

 

the beginning is always the same
http://www.episcopalchurch.org/parish/

 

all saints' episcopal church brighton heights, pa

needs to change to

all-saints-episcopal-church-brighton-heights-pa

 

I need to put in the '-' and take out the (') if there is one and the comma after the city.

 

Then I will be able to import the whole batch and get this work done.

Thanks

Share this post


Link to post
Share on other sites

You will want to take advantage of Substitute(), similar to this:

Substitute ( text ; [ "'" ; "" ] ; [ "," ; "" ] ; [ " " ; "-" ] )

You should be able to copy and paste this into the calculation dialog and simply change 'text' to your field name.

  • Like 1

Share this post


Link to post
Share on other sites

BTW, if it ever doesn't remove the apostrophe then it is probably a smart quote.  You would need to copy it and paste it into the substitution to remove it.  I always uncheck 'use smart quotes' in File > File Options and Text tab.

Share this post


Link to post
Share on other sites

Hi hownow,

 

It appears that all of your questions are on the same need.

 

Please do not multiple post your questions. Instead just reply  to the existing question with the additional need. That way, the members can follow what has already been suggested and how it helped or didnt.

 

Lee

 

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.