Jump to content

text parsing question exchanging spaces for - and removing a ,


This topic is 2048 days old. Please don't post here. Open a new topic instead.

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

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
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.

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

 
Link to post
Share on other sites

This topic is 2048 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

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