![]() |
|
#1
|
|||
|
|||
![]()
Hi slaycock,
Didn't quite get the results I expected. First, it does not handle the space between the open and close square bracket. I removed the space and the f/r did run, but was hoping the find and replace could pick up the ] space [ pattern. However, by removing the space, one of the open square brackets gets changed to a close square bracket on the new line instead of the results in post #1. [Proverbs 4:26 NASB] ]26] Watch the path of your feet And all your ways will be established. [Proverbs 18:19 NASB] ]19] A brother offended is harder to be won than a strong city, And contentions are like the bars of a citadel. [Proverbs 11:29 NASB] ]29] He who troubles his own house will inherit wind, And the foolish will be servant to the wisehearted. |
#2
|
|||
|
|||
![]()
My Apologies there is a typo in the first replace text (That's happening a lot at the moment as I have a new keyboard)
\1^p\1 should read \1^p\2 which I did get right further down the page. My old eyes missed the space between the ] and [ The revised search would be ([\]])(*)([\[]) Personally I find the search text quite hard to scan, particularly on my hi res monitor where the search and replace dialog box is tiny. So on reflection an easier to read version would have been ([^091])(*)([^093]) where 091 and 093 are the decimal ascii codes for [ and ]. You can get more information on find and replace using wildcards by clicking the ? on the find and replace dialog box and first looking under Search by using wildcards and then Find and replace text by using regular expressions (Advanced) |
#3
|
|||
|
|||
![]()
Thanks slaycock for the additional help...
Using... Find What: ([^091])(*)([^093]) >> Use Wildcard checked Replace: \1^p\2 I get six replacement where I would only expect three The following is what is returned... [ Colossians 3:19 NASB [ 19 Husbands, love your wives and do not be embittered against them. [ Ephesians 3:21 NASB [ 21 to Him be the glory in the church and in Christ Jesus to all generations forever and ever. Amen. [ Ephesians 5:33 NASB [ 33 Nevertheless, each individual among you also is to love his own wife even as himself, and the wife must see to it that she respects her husband. Is it possible to just look for the [ followed by a number and generate the return just before that string? |
#4
|
|||
|
|||
![]()
What you are seeing is the ongoing demonstration of my lack of checking due to haste (I'm actually working at home this weekend fighting a deadline).
What has happened is that we have two errors. One in the find field and one in the replace field. In the find field we have the ][ the wrong way round. The find field should be ([^093])(*)([^091] not ([^091])(*)([^093] The error in the replace field comes adding the (*) to the search text. We now have three fields defined by () (Smacks head on wall several times because checking back I can see that my attempt at () in our earlier discussion came out as 9 0. This is because my new keyboard has the number and symbols the wrong way round so my brain types ( but my reflexes type 9 because 9 is above the ( on my new (soon to be ebayed) keyboard) By inserting the (*) your bracket fields have now become fields 1 and 3. By using fields 1 and 2 in the replace text we are replacing the found text with the [ (in this case) and the text found by the (*) (which in this case is everything between the [ and ]) So changing the replace text to \1^p\3 should now get us to the place where you want to be. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jeffreybrown | Word | 4 | 02-13-2017 04:32 PM |
![]() |
johnbrowny | Word | 1 | 02-13-2016 06:45 PM |
Gray square brackets | waldux | Word | 8 | 09-25-2013 04:14 PM |
![]() |
eNGiNe | Word | 2 | 11-21-2012 01:06 AM |
![]() |
daksein | Drawing and Graphics | 4 | 06-21-2011 02:36 AM |