7

In some DOS question, the file mask was given as *-1. How would you quote that in a comment if you e.g. want to ask for clarification?

Screenshot

I have tried:

  • *-``1 in order to separate the minus from the 1.
  • *-​1 using a zero width space, but other than in a question´, it does not get rendered

I have seen the question Why can't we put += 1 in a comment?. I am not asking why such a rule is in place. I'd rather like to know about the

Plenty of workarounds, quick fixes, and pragmatic solutions available

because my approaches didn't work.

11
  • 7
    If you make the comment more "substantial", it won't get blocked by the "-1 because x" filter. or maybe just rephrase it so the -1 isn't at the start? i dunno
    – Kevin B
    Commented Nov 5, 2019 at 20:21
  • 12
    Prefix it with something like “The string”. The regex responsible for this is rather naive, because it only has a simple job to do.
    – Cody Gray Mod
    Commented Nov 5, 2019 at 20:25
  • @KevinB: How do I make it more substantial? That's all there is to say Commented Nov 5, 2019 at 20:26
  • 1
    for example, "Your file mask <..> will not match <...> because <...>, is that intentional?"
    – Kevin B
    Commented Nov 5, 2019 at 20:29
  • Your file mask *-1 will not match knomBk-2.4 because knomBk-2.4 does not contain a 1. You have a 2 inside and a 4, but not a 0 and not a 1. You have a -, which matches the filter. You don't have a +, but you actually don't need one. Is that intentional? Is my comment substantial enough for you? I could elaborate more, if you like. I think I could write a book about it. Commented Nov 5, 2019 at 20:41
  • Yeah, indeed works... :-) Commented Nov 5, 2019 at 20:41
  • 6
    There is another workaround: writing an answer. You wouldn’t necessarily know it from reading some of my answers, but these are generally a bit shorter than a book. They also aren’t subjected to naive regexes. If you have enough to say that you could turn it into an answer, you probably should. Even when requesting clarification on a possible mistake in a question, there’s a thin line between comment and answer. Prefer the answer.
    – Cody Gray Mod
    Commented Nov 5, 2019 at 20:59
  • @CodyGray: ok, got it. In this particular case it would not have been a good answer. Commented Nov 5, 2019 at 21:14
  • @ThomasWeller How do I make it more substantial? Append a wee poem or limerick to your comment ... "A coder who left Rajistan, discovered an enum bad plan..." Commented Nov 5, 2019 at 23:27
  • 1
    I like how this is closed as a duplicate, although I have already mentioned how the duplicate does not answer my question. Wow. Commented Nov 6, 2019 at 11:56
  • 2
    The answer starts with a workaround. "If you don't use +1 it at the start of the comment, you can circumvent the restriction" followed by a screenshot which demonstrates that
    – adiga
    Commented Nov 6, 2019 at 13:33

1 Answer 1

-3

HTML entities don't work in comments (feature request). You can use an actual ZWNJ instead (for example, in bash, with printf '\u200c'). Oddly enough, it wasn't inserting a ZWNJ between - and 1 that worked for me, but inserting it before - (either after * or before *):

`*‌-1` will not match `knomBk-2.4`.

¯\_(ツ)_/¯

Not the answer you're looking for? Browse other questions tagged .