# Extracting a Numeric Value from a 1 variable latex string

**URL:** https://cl.desmos.com/t/extracting-a-numeric-value-from-a-1-variable-latex-string/1610
**Category:** Questions
**Created:** [October 1, 2020, 11:42pm UTC](https://cl.desmos.com/t/extracting-a-numeric-value-from-a-1-variable-latex-string/1610 "2020-10-01T23:42:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Jeff\_Hruby](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jeff_hruby/32/366_2.png) [@Jeff\_Hruby](https://cl.desmos.com/u/Jeff_Hruby)
#### Post date: [October 1, 2020, 11:42pm UTC](https://cl.desmos.com/t/extracting-a-numeric-value-from-a-1-variable-latex-string/1610/1 "2020-10-01T23:42:44Z")

</div>

Is it possible to extract a numeric value from the latex string from a student math input? For example, if the student inputs x+4=7, can I get the value 3 out of this?

In effect, I want the latex string solved if it is a 1 variable equation.

Alternatively, can I carry the entire latex string for the student input and put it into a row of a table connected to a graph. For example, if the x+4=7 was carried into a row of the graph, a vertical line will appear at x=3.

---

<div class="post-metadata">

### Author: ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)
#### Post date: [October 2, 2020, 1:33am UTC](https://cl.desmos.com/t/extracting-a-numeric-value-from-a-1-variable-latex-string/1610/3 "2020-10-02T01:33:45Z")

</div>

Are you sure this solution works for all sorts of equations? It seems from looking at it that it only works for a number +/- x (with a coefficient of 1) on one side and a number on the other.
