Distance between grids
-
@Alan-Kilborn Thanks Alan, only the first part has already solved my problem, because I need to keep the information of the lines, after I pasted in a new N ++ tab, edited and placed it in descending order … take care of yourself
-
@PeterJones Thanks Peter, I used Alan information, take care of yourself
-
Hello,@Francisco
Please try this code,To distance between gridsHtml code:
<div class="wrapper aligned"> <div class="box item1">One</div> <div class="box item2">Two</div> <div class="box item3">Three</div> <div class="box item4">Four</div> <div class="box item5">Five</div> </div>
Css code :
html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } body { margin: 40px; } .wrapper { margin: 0 0 20px 0; width: 500px; height: 400px; border: 2px solid #CCC; display: grid; grid-gap: 10px; grid-template-columns: repeat(4, 80px); grid-template-rows: repeat(3,100px); align-content: space-around; justify-content: space-between; } .box { background-color: #444; color: #fff; border-radius: 5px; padding: 20px; font-size: 150%; } .item1 { grid-column: 1 / 5; } .item2 { grid-column: 1 / 3; grid-row: 2 / 4; } .item3 { grid-column: 3 / 5; }
I hope this code will be useful.
Thank you. -
@Alan-Kilborn Allan, GM, some lines have a small difference, the number 1, between the number “2” and the character “~” so these lines were selected … how to correct?
QSO 11: 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~ 724km Mult. ‘GG43’ band 144MHz (mult +1) -
@Makwana-Prahlad GM, thanks, sorry, its not how to use this scheme.
-
@Alan-Kilborn sorry, it also has a comma after km
QSO 11 : 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~724km, Mult. ‘GG43’ band 144MHz (mult +1) -
@Francisco said in Distance between grids:
sorry, it also has a comma after km
QSO 11 : 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~724km, Mult. ‘GG43’ band 144MHz (mult +1)
It also appears you no longer have the space between the
~
and the number of km. It’s hard to hit a moving target.Also, it would be really nice if you followed my original advice and used the forum’s toolbar or manual Markdown code to format your example text as text, so we could be sure that we were seeing what you were originally typing (the forum considers many characters and character-combos as special, and will make changes. For example, I am betting that you typed
'GG43'
with normal ASCII single quotes, but the forum sees quotes as something it can modify, so it presented it with so-called smart-quotes / curly-quotes, as‘GG43’
. If the quoting had ended up being important to your question (which it didn’t, in this instance), it could have sent us down the wrong path.It also makes the data stand out as data; see my modified-quote of your text.
I would change @Alan-Kilborn’s search regex to
(?-is)^.+~\h*(?=\d+km)
. Using the\h*
instead of a single space in the regex will allow there to be zero or more spaces between the tilde and the number. Using\d+
instead of\d{3}
means one or more digits (instead of his original exactly-three digits), which will allow~ 1km
or~ 1100km
to match, too (all your examples have been three digits so far… but given the moving goalposts you are setting, it wouldn’t surprise me if those changed). And removing the$
at the end of the lookahead means thatkm
doesn’t have to be the last token on the line, so things can come after thekm
. -
To quote myself:
@Alan-Kilborn said in Distance between grids:
…perhaps because something critical may have been left out of the problem statement.
:-)
Really my goal was just to lay the groundwork of an approach that could be used, on a problem that sounded like something a one-shot search operation can’t really accomplish.
Of course, as the “goalposts” move (LOL) maybe a simple-search would have been good enough? Really, though, still hard to tell.
I think we have a new idiom to join “baking cookies” and perhaps some others… : “moving goalposts”. BTW, it seems an oxymoron to “set” the “moving goalposts”. :-)
-
Sorry for the confusion, i don’t speak english, i’m using the google translator. The forum has already helped me a lot, with my difficulties, despite my 67 years, even on other occasions … I thank you for your patience. take careIt two lines, i send a copy and paste:
QSO 10 : 144 PH 2020-06-14 1219 PT9VR 59 GG29QN PT9AL 59 GG27OS 2 - ~200km
QSO 11 : 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~724km, Mult. ‘GG43’ band 144MHz (mult +1) -
@Francisco said in Distance between grids:
i send a copy and paste:
QSO 10 : 144 PH 2020-06-14 1219 PT9VR 59 GG29QN PT9AL 59 GG27OS 2 - ~200km
QSO 11 : 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~724km, Mult. ‘GG43’ band 144MHz (mult +1)Please use the toolbar button
</>
to format your text:
The regex I supplied above,
- FIND =
(?-is)^.+~\h*(?=\d+km)
will find the distances in the following text:
QSO 10 : 144 PH 2020-06-14 1219 PT9VR 59 GG29QN PT9AL 59 GG27OS 2 - ~200km QSO 11 : 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~724km, Mult. 'GG43' band 144MHz (mult +1)
However, if you want to leave only the distances, as @Alan-Kilborn’s original regex was meant to do, edit it slightly:
- FIND =
(?-is)^.+~\h*(\d+km).*$
- REPLACE =
$1
- MODE = regular expression
Good luck
- FIND =
-
@PeterJones
FIND = (?-is)^.+~\h*(?=\d+km)
I hope I got it right in the reply, Peter just this command resolves to, thank you very much. GL