Skip to main content
edited tags
Link
Tweeted twitter.com/StackMma/status/691335561383153665
added 8 characters in body; edited tags
Source Link
Kuba
  • 138.9k
  • 13
  • 297
  • 803

Say I have a compound Fe3O4, and I want to separate the name of elements and number. The code I write for separate number is atomicMassAlloys[Alloy_String] := StringCases[Alloy, DigitCharacter] But

atomicMassAlloys[Alloy_String] := StringCases[Alloy, DigitCharacter] 

But I do not know how to separate the name of element

Say I have a compound Fe3O4, and I want to separate the name of elements and number. The code I write for separate number is atomicMassAlloys[Alloy_String] := StringCases[Alloy, DigitCharacter] But I do not know how to separate the name of element

Say I have a compound Fe3O4, and I want to separate the name of elements and number. The code I write for separate number is

atomicMassAlloys[Alloy_String] := StringCases[Alloy, DigitCharacter] 

But I do not know how to separate the name of element

Source Link
1234
  • 81
  • 2

How to I extract the element name of a chemical compound in a string?

Say I have a compound Fe3O4, and I want to separate the name of elements and number. The code I write for separate number is atomicMassAlloys[Alloy_String] := StringCases[Alloy, DigitCharacter] But I do not know how to separate the name of element