I could provide the ready made regex pattern, but I promise it's actually really simple and you should be able to do it yourself - if it was complicated I would have posted it already, you know...
You already posted the <quickQuote> structure that your [mIndex1_Price] is using as the "input string" via its StringIndex=1 option:
Code: Select all
<quickQuote>
<altName>NVIDIA Corp</altName>
<altSymbol>NVDA.O</altSymbol>
<assetSubType>Common Stock</assetSubType>
<assetType>STOCK</assetType>
<cacheServed>false</cacheServed>
<cachedTime>Mon May 27 03:51:02 EDT 2024</cachedTime>
<change>-0.00</change>
<change_pct>-0.00</change_pct>
<cnbcId>0</cnbcId>
<code>0</code>
<comments>Composite</comments>
<countryCode>US</countryCode>
<curmktstatus>POST_MKT</curmktstatus>
<currencyCode>USD</currencyCode>
<exchange>NASDAQ</exchange>
<extendedMktQuote>
<afthrs_last_time>2024-05-24T01:00:00.000-0400</afthrs_last_time>
<change>4.31</change>
<change_pct>0.4048</change_pct>
<exchange>NASDAQ</exchange>
<fullchange>4.3099</fullchange>
<fullchange_pct>0.4048</fullchange_pct>
<last>1069.00</last>
<last_time>2024-05-24</last_time>
<last_time_msec>1716796262674</last_time_msec>
<source>Last NYSE Arca, VOL From CTA</source>
<timeZone>EDT</timeZone>
<type>POST_MKT</type>
<volume>1529669</volume>
</extendedMktQuote>
<feedSymbol>NVDA.O</feedSymbol>
<fullVolume>42949367</fullVolume>
<fundamentalData>
<beta>1.6785</beta>
<DEBTEQTYQ>19.759066</DEBTEQTYQ>
<dividend>0.40</dividend>
<dividendyield>0.0004</dividendyield>
<eps>17.0868</eps>
<feps>24.448</feps>
<fpe>43.549164</fpe>
<fpsales>22.263304</fpsales>
<fsales>117635760128</fsales>
<GROSMGNTTM>75.43435</GROSMGNTTM>
<MPreviousClose>1037.98999</MPreviousClose>
<mktcap>2618960642048</mktcap>
<mktcapView>2618960.5M</mktcapView>
<NETPROFTTM>53.3971</NETPROFTTM>
<PDYTDPCHG>109.60179</PDYTDPCHG>
<pcttendayvol>1.0593</pcttendayvol>
<pe>62.31067</pe>
<psales>32.829754</psales>
<ROETTM>115.6553</ROETTM>
<revenuettm>79773999104</revenuettm>
<revenuettmView>79774.0M</revenuettmView>
<sharesout>2459834112</sharesout>
<sharesoutView>2459.83M</sharesoutView>
<TTMEBITD>49853.0</TTMEBITD>
<tendayavgvol>40543152.00</tendayavgvol>
<yragoprice>305.38</yragoprice>
<yragopricechange>759.30994</yragopricechange>
<yragopricechangepct>248.64429</yragopricechangepct>
<yrhidate>2024-05-24</yrhidate>
<yrhiprice>1064.75</yrhiprice>
<yrlodate>2023-05-24</yrlodate>
<yrloprice>298.06</yrloprice>
</fundamentalData>
<high>1064.75</high>
<issue_id>218647</issue_id>
<issuer_id>27095</issuer_id>
<last>1064.69</last>
<last_time>2024-05-24</last_time>
<last_time_msec>1716796262674</last_time_msec>
<low>1030.00</low>
<mainmktstatus>CLOSE</mainmktstatus>
<name>NVIDIA Corp</name>
<onAirName>NVIDIA</onAirName>
<open>1044.49</open>
<prev_prev_closing>1037.99</prev_prev_closing>
<previous_day_closing>1037.99</previous_day_closing>
<provider>CNBC QUOTE CACHE</provider>
<providerSymbol>NVDA</providerSymbol>
<quoteDesc/>
<realTime>true</realTime>
<reg_last_time>2024-05-24T16:00:00.000-0400</reg_last_time>
<reg_market_close>16:00:00</reg_market_close>
<reg_market_open>09:30:00</reg_market_open>
<responseTime>Mon May 27 03:51:02 EDT 2024</responseTime>
<shortName>NVDA</shortName>
<source>Last NYSE Arca, VOL From CTA</source>
<streamable>1</streamable>
<symbol>NVDA</symbol>
<symbolType>symbol</symbolType>
<timeZone>EDT</timeZone>
<todays_closing>1037.99</todays_closing>
<trading_day_type>HOLIDAY</trading_day_type>
<volume>39728626</volume>
</quickQuote>
Code: Select all
(?siU)^.*?<last>(.*)<\/last>
Code: Select all
(?siU)^(?|...|.*?<last>(.*)<\/last>)
Oh, and you already have the testing sites where you can copy paste and see if what you write works. See where I'm going with this and why it's so easy that you can also do it in a heartbeat?
![Sly :sly:](./images/smilies/do.gif)
P.S. I moved the (?siU)^ out of the branch reset since this is just the collection of space ignoring (?s), case insensitive (?i) and ungreedy (?U) flags, followed by the ^ symbol aka the start of the string - and these are the same for both branches. Let me know if you don't understand something from the above.
![Wink ;-)](./images/smilies/innuendo.gif)