I am very weak with Regex and need help. Input looks like the following:
<span> 10/28 Currency: USD
Desired output is 10/28.
I need to get all text between the <span> and “Currency:” that are numbers, a “/” character, or a “:” character. No spaces.
Can you help? Thanks.
Updated: What you’re describing is three parts.
What we do want is one or more characters that are digits, forward slash, and
::[0-9/:]*(the asterisk means “zero or more instances”). Surrounded by:<span>(optional stuff we don't want)is represented as:<span>[^0-9/:]*(optional stuff we don't want)Currencyis:[^0-9/:]*Currency(The
^means “not”) – so this will essentially match any number of characters which is not the bits we want, including things like In c#: