TBOne,
You are the man with near 20K posts :-) Sorry this one seems not working: Quote:
|
I've tested the following possible cases:
case , case , case case[space][space][space] case whatever case, case,[space][space][space] case,whatever case, whatever case; case: case1 case2 case3 The following code can remove everything except "site whatever", excluding case1/case2/case3 of course. Quote:
Thanks. |
Studying it now. Just missed it...
Quote:
|
Your latest requirement has the space again.
It can be included in the [ ] character set like this Code:
[[:space:][:punct:]] Code:
[[:space:],:] |
Quote:
As Hazel pointed out initially, use a wild card. If you want "johnsmith<any punctuation><any spaces><end of line>" to work, you've been given all the pieces in this thread to accomplish this. Search for multiple spaces, then anything after it until EOL. And a MUCH better question here is, why does it **HAVE TO BE** a single SED statment, and why can you not sanitize your data first?? Would seem to be much easier to convert everything to a single case, strip out multiple whitespace characters and replace with single spaces, etc. |
MadeInGermany, Thank you much again! It looks like this one working very well:
Quote:
|
Thank you, TBOne.
Let's me keep learning the stuff :) |
You will never stop seeing suggestions that make you think "hmm, that's an interesting way of doing that". Regex is like that.
I will add that I never use "*" unless I can do no else. Tosses up too many "corner case" matches that cause too much angst. |
All times are GMT -5. The time now is 04:44 AM. |