insert Regex trick at any step (mid?) Advanced Editor

ooptennoort

Board Regular
Joined
Mar 29, 2021
Messages
67
Office Version
  1. 365
Platform
  1. Windows
Trying to use run the Regex trick (that members Grah and Bo_Ry skillfully adapted for this case), I run into a problem which might have to with my worksheet not being a table. The error text is:

Expression.Error: The field 'Comment' of the record wasn't found.
Details:
Name=Sheet1
Data=


Item=Sheet1
Kind=Sheet
Hidden=FALSE


The Regex trick in this case was:

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
Regex = Table.AddColumn(Source, "Regex", each Text.Combine(Json.Document(Web.Page(
"<meta http-equiv='X-UA-Compatible' content='IE=edge'> <script>
document.write(JSON.stringify('"& [Comment] &"'.match(/\d+[A-Z]-\d+-\d+/g)));
</script>")[Data]{0}[Children]{0}[Children]{1}[Text]{0}),", "))
in
Regex


My question:
Maybe if I'd simplify my workbook, convert to range etc. I could get the trick to work but... why not reach higher: can the Regex trick be altered to be inserted anywhere, at any step, in the Advanced Editor? If so, how? If not (most likely), could anyone pls direct me to literature where I can read why not (and maybe even learn to make a workaround)?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,224,815
Messages
6,181,136
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top