How do you say the position after the last pattern match?












-2















I am struggling to find the proper variable name by pattern matching. When I have a pattern like "abc" and I have a string like "123abc456", then we have 2 positions here related to the pattern match. The first position is after the "123" part at the beginning of the match and the second position is before the "456" part at the ending of the match: "123|abc|456". These positions are the number of the characters from the beginning of the string and we call them "index" in programming (so the values are 3 and 6 in this case). I named the first position as "match.index" and I am looking for a better name than "match.afterIndex" for the second position, but I could not come up with anything more expressive so far. I can rename the "index" too if necessary. Any idea?










share|improve this question


















  • 3





    I'm voting to close this question because the naming of variables and other programming artifacts is specifically off topic here.

    – Robusto
    4 hours ago











  • It doesn't matter. The names won't be seen or known by the end-user. All that matters is that they are clear for you and anyone else who reads the code.

    – Weather Vane
    3 hours ago






  • 1





    It seems odd to me that you want to know the index of the first character following the last character of the matched substring. Why not track the start position of the matched substring and the end position of the matched substring?

    – TRomano
    3 hours ago








  • 1





    You either need to mark the first and last characters of the match (or first character post-match as you prefer?), or you should mark the start of the match and give a length of the match string. But I’ve known programmers to use variable names like "s", "e", "l", so it’s really too much of a matter of opinion to be on topic here.

    – Pam
    3 hours ago











  • @Robusto Well it is still about how you express yourself in English. I could rephrase the question to not contain programming terms, but it is easier to explain the problem within this context.

    – inf3rno
    2 hours ago
















-2















I am struggling to find the proper variable name by pattern matching. When I have a pattern like "abc" and I have a string like "123abc456", then we have 2 positions here related to the pattern match. The first position is after the "123" part at the beginning of the match and the second position is before the "456" part at the ending of the match: "123|abc|456". These positions are the number of the characters from the beginning of the string and we call them "index" in programming (so the values are 3 and 6 in this case). I named the first position as "match.index" and I am looking for a better name than "match.afterIndex" for the second position, but I could not come up with anything more expressive so far. I can rename the "index" too if necessary. Any idea?










share|improve this question


















  • 3





    I'm voting to close this question because the naming of variables and other programming artifacts is specifically off topic here.

    – Robusto
    4 hours ago











  • It doesn't matter. The names won't be seen or known by the end-user. All that matters is that they are clear for you and anyone else who reads the code.

    – Weather Vane
    3 hours ago






  • 1





    It seems odd to me that you want to know the index of the first character following the last character of the matched substring. Why not track the start position of the matched substring and the end position of the matched substring?

    – TRomano
    3 hours ago








  • 1





    You either need to mark the first and last characters of the match (or first character post-match as you prefer?), or you should mark the start of the match and give a length of the match string. But I’ve known programmers to use variable names like "s", "e", "l", so it’s really too much of a matter of opinion to be on topic here.

    – Pam
    3 hours ago











  • @Robusto Well it is still about how you express yourself in English. I could rephrase the question to not contain programming terms, but it is easier to explain the problem within this context.

    – inf3rno
    2 hours ago














-2












-2








-2








I am struggling to find the proper variable name by pattern matching. When I have a pattern like "abc" and I have a string like "123abc456", then we have 2 positions here related to the pattern match. The first position is after the "123" part at the beginning of the match and the second position is before the "456" part at the ending of the match: "123|abc|456". These positions are the number of the characters from the beginning of the string and we call them "index" in programming (so the values are 3 and 6 in this case). I named the first position as "match.index" and I am looking for a better name than "match.afterIndex" for the second position, but I could not come up with anything more expressive so far. I can rename the "index" too if necessary. Any idea?










share|improve this question














I am struggling to find the proper variable name by pattern matching. When I have a pattern like "abc" and I have a string like "123abc456", then we have 2 positions here related to the pattern match. The first position is after the "123" part at the beginning of the match and the second position is before the "456" part at the ending of the match: "123|abc|456". These positions are the number of the characters from the beginning of the string and we call them "index" in programming (so the values are 3 and 6 in this case). I named the first position as "match.index" and I am looking for a better name than "match.afterIndex" for the second position, but I could not come up with anything more expressive so far. I can rename the "index" too if necessary. Any idea?







phrase-requests






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 5 hours ago









inf3rnoinf3rno

1446




1446








  • 3





    I'm voting to close this question because the naming of variables and other programming artifacts is specifically off topic here.

    – Robusto
    4 hours ago











  • It doesn't matter. The names won't be seen or known by the end-user. All that matters is that they are clear for you and anyone else who reads the code.

    – Weather Vane
    3 hours ago






  • 1





    It seems odd to me that you want to know the index of the first character following the last character of the matched substring. Why not track the start position of the matched substring and the end position of the matched substring?

    – TRomano
    3 hours ago








  • 1





    You either need to mark the first and last characters of the match (or first character post-match as you prefer?), or you should mark the start of the match and give a length of the match string. But I’ve known programmers to use variable names like "s", "e", "l", so it’s really too much of a matter of opinion to be on topic here.

    – Pam
    3 hours ago











  • @Robusto Well it is still about how you express yourself in English. I could rephrase the question to not contain programming terms, but it is easier to explain the problem within this context.

    – inf3rno
    2 hours ago














  • 3





    I'm voting to close this question because the naming of variables and other programming artifacts is specifically off topic here.

    – Robusto
    4 hours ago











  • It doesn't matter. The names won't be seen or known by the end-user. All that matters is that they are clear for you and anyone else who reads the code.

    – Weather Vane
    3 hours ago






  • 1





    It seems odd to me that you want to know the index of the first character following the last character of the matched substring. Why not track the start position of the matched substring and the end position of the matched substring?

    – TRomano
    3 hours ago








  • 1





    You either need to mark the first and last characters of the match (or first character post-match as you prefer?), or you should mark the start of the match and give a length of the match string. But I’ve known programmers to use variable names like "s", "e", "l", so it’s really too much of a matter of opinion to be on topic here.

    – Pam
    3 hours ago











  • @Robusto Well it is still about how you express yourself in English. I could rephrase the question to not contain programming terms, but it is easier to explain the problem within this context.

    – inf3rno
    2 hours ago








3




3





I'm voting to close this question because the naming of variables and other programming artifacts is specifically off topic here.

– Robusto
4 hours ago





I'm voting to close this question because the naming of variables and other programming artifacts is specifically off topic here.

– Robusto
4 hours ago













It doesn't matter. The names won't be seen or known by the end-user. All that matters is that they are clear for you and anyone else who reads the code.

– Weather Vane
3 hours ago





It doesn't matter. The names won't be seen or known by the end-user. All that matters is that they are clear for you and anyone else who reads the code.

– Weather Vane
3 hours ago




1




1





It seems odd to me that you want to know the index of the first character following the last character of the matched substring. Why not track the start position of the matched substring and the end position of the matched substring?

– TRomano
3 hours ago







It seems odd to me that you want to know the index of the first character following the last character of the matched substring. Why not track the start position of the matched substring and the end position of the matched substring?

– TRomano
3 hours ago






1




1





You either need to mark the first and last characters of the match (or first character post-match as you prefer?), or you should mark the start of the match and give a length of the match string. But I’ve known programmers to use variable names like "s", "e", "l", so it’s really too much of a matter of opinion to be on topic here.

– Pam
3 hours ago





You either need to mark the first and last characters of the match (or first character post-match as you prefer?), or you should mark the start of the match and give a length of the match string. But I’ve known programmers to use variable names like "s", "e", "l", so it’s really too much of a matter of opinion to be on topic here.

– Pam
3 hours ago













@Robusto Well it is still about how you express yourself in English. I could rephrase the question to not contain programming terms, but it is easier to explain the problem within this context.

– inf3rno
2 hours ago





@Robusto Well it is still about how you express yourself in English. I could rephrase the question to not contain programming terms, but it is easier to explain the problem within this context.

– inf3rno
2 hours ago










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "97"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fenglish.stackexchange.com%2fquestions%2f488722%2fhow-do-you-say-the-position-after-the-last-pattern-match%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to English Language & Usage Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fenglish.stackexchange.com%2fquestions%2f488722%2fhow-do-you-say-the-position-after-the-last-pattern-match%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b