I am trying to use jQuery to split a text string and remove/hide part of the string. This is all part of a single span class that is dynamically generated.
<span>Item in transit from Centerville since 05/14/2018<span>
The problem is the "since 04/12/2018" is always different. The date always changes. I want the element to look like this:
<span>Item in transit from Centerville</span>
Is there a way to do this with jQuery? One constant seems to be the 'since' part, which always precedes the dynamically generated date. Can that be used to split the string and achieve my desired result?
Thanks in advance.