2

I have a document with a many looks like look something like:

[9/22/17 10:46 AM] xxxxxxxx: llllllllllllllllllll
[9/22/17 10:46 AM] Cc:  cccccccccc
[9/22/17 10:46 AM] Me: bbbbbbbbbbbbbbbbb
[9/22/17 10:46 AM] Ccc: aaaaaaaaaaaaaaaaaaaaaaaaaa 

I am trying to select the range from [ to : and replace it with a blank. I know I have to use wildcards and ignore white space in word but I can't seem to get the range correct. I searched around but can't seem to find exactly what I need.

2

You’re confusing yourself my misusing the word “range”.  [0-9] is a range matching every digit (in “Arabic” numerals), [aeiou] is a range matching every vowel.  Those aren’t what you want.

If you want to match everything through the last colon on the line, that might be tricky.  But if you are always searching for everything through the second colon (i.e., plowing through the one that’s part of the time), use \[*:*:.  The \ causes the [ (i.e., \[) to be treated as an ordinary character, and not the beginning of a range.  Then match everything (*) through a colon, and then everything through a colon again.

  • This did it! thanks for clearing up the misuse of "range" – sourlemonaid Mar 21 '18 at 1:15
2

I realized the reason why [*: was not working was because [ is a wildcard character and I had to put a \ in front of it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.