Forum Replies Created
-
AuthorPosts
-
August 20, 2018 at 10:06 pm in reply to: Is there no way to select an inline table to be able to move it?? #110010
Alley J
ParticipantI forgot to mention that I’m using a left/right paragraph border on each side of the text frames (& they line up so the next text box’s left border sits on the previous box’s right border) but by putting the price box in an anchored text frame, I don’t seem to be able to get the border to work for that last paragraph so that’s not ideal but I can probably find a work-around for that.
Alley J
ParticipantThanks, Obi-Wan. What does the ((?3))’ do? I tried using alternatives to the ‘/1’ – ‘/2’, ‘/3’, etc but they don’t work! Is it like that?
(Ha, like the ‘^/’ – just realised what it was after seeing it on many posts!)Alley J
ParticipantBefore your last reply, I had shortened the 2nd query like this:
((January|February|March|April|May|June|July|August|September|October|November|December).+?\r?){2}putting a ‘?’ after return to catch the last set of numbers at the ‘end of story’. But further shortening never hurts!
I was initially able to extract the 2nd set of numbers (for 2018) using the ‘\1’ find duplicate query:
Find:
(\u+\r)(\d+.*\r)*\1Change to:
$1Shorter, still :)
I was just struggling to find a way to extract only the 1st set of year’s months (for 2017).
But with all of these refinements, it’s finally worked so thanks so much for your help with that – the query with the ‘or’ months did the trick with just a few adjustments & abbreviations along the way & now I’m a ‘happy Grep-er’!
Alley J
ParticipantThanks, David – I tried the script (changing the page_span to 0) & it just seemed to delete the first line (January) but I’m not sure what I’m doing there, exactly, so I’ll have another good look but I did work out a solution, based on Graham’s suggested Find. I just need to run one Grep, then run a 2nd one on the original text again:
Find what:
(January|February|March|April|May|June|July|August|September|October|November|December)\r(.*?)\r
(January|February|March|April|May|June|July|August|September|October|November|December)\r(.*?)$Change to:
$1$2\r& then again with the Change to:
$3$4\rPerfectly seps out 1 year at a time. (I’ve been unsure about the ‘or’ symbol – whether it needs square brackets around it or not but this shows me when I do & don’t, too.)
Appreciate you both taking the time – it’s another ‘happily ever after’ in Grep land!
Alley J
ParticipantNo worries, thanks for looking, anyway :)
Alley J
ParticipantJanuary
3, 8,10,15, 22, 24, 26, 29
January
5,10,12,17, 24, 26, 29, 31
February
5, 12,16, 19, 21, 26
February
7, 14, 19, 21, 23, 28
March
2, 5, 12,19, 26
March
5, 7, 14, 21, 28
April
2, 9, 16, 23, 30
April
4, 11,18, 25
May
7, 14, 21, 28
May
2, 9, 16, 23, 30
June
4, 11, 18, 25
June
6, 13, 20, 27
July
2, 9, 16, 23, 30
July
4, 11, 18, 25
August
6, 13, 20, 27
August
1, 8, 15, 22, 29
September
3,10,17,24
September
5,12,19,26
October
1, 8, 15, 22, 24, 29
October
3, 10, 17, 24, 26, 31
November
5, 12, 19, 26
November
7, 14, 21, 28
December
3, 10, 17, 19
December
5, 12, 19, 21Alley J
ParticipantThanks for your reply, Graham. Upon re-reading, I realise I didn’t make it very clear (you know, I know what I mean!!). What it is, is 2 years of dates that when copied from the pdf, actually come in Jan\r\d, \d, \d+\rJan\r\d, \d, \d+\r, etc for the 2 years (so Jan 2017 followed by Jan 2018, followed by Feb 2017, then Feb 2018, etc, etc – I had changed the returns & comma-space to but originally it was as above – a return after each date & then each set of numbers). I needed to extract the set of 2017 months from the 2018. I got the 2018 by keeping only the duplicate set (using .*? for the numbers). But in the end, as time was a-wasting, I just changed it as nec. to become a table, cut that column & converted it back to text – it was the simplest solution but I’ve only picked up Grep in the last 2 or so years & so it was the (as someone else has put it), brain acrobatics? to see if it would work should it keep coming up again.
In another similar situation, I applied numbering to each line, changed the numbers to text & used that to distinguish which lines I wanted where. It was a bit round-about, but I got there!
But thank you for taking the time!
-
AuthorPosts