You are viewing limited content. For full access, please sign in.

Question

Question

Need to remove a whitespace followed by *FLC

asked on May 7, 2018

I need to write pattern matching to escape a whitespace character followed by *FLC.  This is for our vendor names, and some of them look like this:

ABC Contracting, Inc. *FLC

I need to change this so that it reads

ABC Contracting, Inc.

with no whitespace character following Inc.

The *FLC is ALWAYS at the end of the vendor name (in the situations where it applies).

I need to remove these characters when addressing the contractor, since this really isn't part of their name, just part of our configuration process to note which vendors are FLC's (farm labor contractors).

I'm sure this is possible through pattern matching and regular expressions; however, I just can't figure it out.  Any help you can give would be greatly appreciated!

 

0 0

Answer

SELECTED ANSWER
replied on May 7, 2018
(.*) \*FLC

 

0 0
replied on May 7, 2018

Thank you so much!  Both of these configurations (Darrell and Andrew's) appeared to work fine.

0 0

Replies

replied on May 7, 2018

This should work:

^(.+)\s+\*FLC

It will match everything from the beginning of the filed up to space(s) followed by *FLC

 

~ Andrew

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.