Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How do I use REGEXTRACT to return grouped numbers from a string where the number of groups varies?

$
0
0

In Google Sheets, I'm trying to return numbers from within a text string.

The numbers are values of the property named either item_id or item_ids.

I've tried the REGEXTRACT function but I'm struggling.

Example 1

  1.   Text in cell A1
    <!-- wp:shortcode -->[aces-unit-1 item_id=""1236""]<!-- /wp:shortcode -->
  2.   Expected Result
    1236

Example 2

  1.   Text in cell A1
    <!-- wp:shortcode -->[aces-bonuses-1 items_number=""4"" external_link=""1"" category="""" items_id=""1563, 2372, 3855, 3980"" exclude_id="""" parent_id="""" columns=""4"" order="""" orderby="""" title=""""]<!-- /wp:shortcode -->
  2.   Expected Result
    1563, 2372, 3855, 3980

Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>