25
$\begingroup$

Bug introduced in 10.0.1 and fixed in 10.0.2


I observed the following with StringCases when trying to use rules/patterns. Here is a screenshot of the behavior:

Mathematica graphics

Not only is the pattern highlighted in red, hovering the mouse over it claims it's an unknown option as shown above. Can anyone confirm this behavior? I'm on Windows 8.1. Regardless of this behavior, it does appear to work as expected.

$\endgroup$
10
  • $\begingroup$ Red color also under Linux. I don't have the hint. Maybe because I disabled some annoying hinting features in options. $\endgroup$
    – ybeltukov
    Sep 19, 2014 at 20:04
  • $\begingroup$ @ybeltukov. Thanks for confirming. $\endgroup$
    – RunnyKine
    Sep 19, 2014 at 20:08
  • $\begingroup$ It's even red in the help. So maybe it is on purpose? If you do not want to see red things, just do StringCases["item13", {"item"~~x:DigitCharacter.. :> x}] $\endgroup$ Sep 19, 2014 at 20:19
  • $\begingroup$ @RolfMertig, why would it be on purpose, when it has worked that way forever and there's no documentation of a change in behavior? $\endgroup$
    – RunnyKine
    Sep 19, 2014 at 20:23
  • $\begingroup$ I can also confirm (Win 8.1). On top of that, if I try an example (pick one at random, showing red) from the Documentation for StringCases in a clean NB, then hover my mouse over some the other red hints on the Documentation page, version 10.0.1 crashes. Seems related to hovering over more than 1 or 2 of the red hints. Very weird. Anyone else see this happen? $\endgroup$
    – david
    Sep 19, 2014 at 20:29

1 Answer 1

6
$\begingroup$

This syntax coloring bug was fixed in Mathematica 10.0.2:

enter image description here

$\endgroup$
2
  • $\begingroup$ Thank you. In which version did this bug first appear? $\endgroup$
    – Mr.Wizard
    Dec 18, 2014 at 23:49
  • $\begingroup$ @Mr.Wizard A belated response, but it first appeared in 10.1.0 (together with the operator form of StringCases). $\endgroup$
    – ilian
    Aug 6, 2015 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.