BoxLang: Our new JVM Dynamic Language made by Ortus! Check it out: https://www.boxlang.io

Compat: reMatchNoCase should find matches but generates error

Description

The following reMatchNoCase returns matches in ACF and Lucee but not BL.

<cfsavecontent variable="parentHTML"> <div wire:snapshot="{&quot;data&quot;:{},&quot;memo&quot;:{&quot;id&quot;:&quot;9872151c146955820555bf5dbbe7d9e1&quot;,&quot;name&quot;:&quot;should_detect_lazy_loaded_children&quot;,&quot;path&quot;:&quot;should_detect_lazy_loaded_children&quot;,&quot;method&quot;:&quot;GET&quot;,&quot;children&quot;:{&quot;9872151c146955820555bf5dbbe7d9e1-0&quot;:[&quot;div&quot;,&quot;2d03c300a500a815ec1527d146bfca48&quot;]},&quot;scripts&quot;:[],&quot;assets&quot;:[],&quot;isolate&quot;:false,&quot;lazyLoaded&quot;:false,&quot;lazyIsolated&quot;:true,&quot;errors&quot;:[],&quot;locale&quot;:&quot;en&quot;},&quot;checksum&quot;:&quot;f9f66fa895026e389a10ce006daf3f59afaec8db50cdb60f152af599b32f9192&quot;}" wire:effects="[]" wire:id="9872151c146955820555bf5dbbe7d9e1"> <h1>Parent</h1> <!-- start child --> <div wire:snapshot="{&quot;data&quot;:{},&quot;memo&quot;:{&quot;id&quot;:&quot;2d03c300a500a815ec1527d146bfca48&quot;,&quot;name&quot;:&quot;child_component&quot;,&quot;path&quot;:&quot;child_component&quot;,&quot;method&quot;:&quot;GET&quot;,&quot;children&quot;:[],&quot;scripts&quot;:[],&quot;assets&quot;:[],&quot;isolate&quot;:true,&quot;lazyLoaded&quot;:false,&quot;lazyIsolated&quot;:true,&quot;errors&quot;:[],&quot;locale&quot;:&quot;en&quot;},&quot;checksum&quot;:&quot;f9f66fa895026e389a10ce006daf3f59afaec8db50cdb60f152af599b32f9192&quot;}" wire:effects="[]" wire:id="2d03c300a500a815ec1527d146bfca48" x-intersect="$wire._lazyMount(&#039;eyJkYXRhIjp7ImZvck1vdW50IjpbeyJzIjoiYXJyIn1dfSwibWVtbyI6eyJpZCI6IjJkMDNjMzAwYTUwMGE4MTVlYzE1MjdkMTQ2YmZjYTQ4IiwibmFtZSI6Il9fbW91bnRQYXJhbXNDb250YWluZXIiLCJwYXRoIjoiLyIsIm1ldGhvZCI6IkdFVCIsImNoaWxkcmVuIjpbXSwic2NyaXB0cyI6W10sImFzc2V0cyI6W10sImVycm9ycyI6W10sImxvY2FsZSI6ImVuIn0sImNoZWNrc3VtIjoiZjlmNjZmYTg5NTAyNmUzODlhMTBjZTAwNmRhZjNmNTlhZmFlYzhkYjUwY2RiNjBmMTUyYWY1OTliMzJmOTE5MiJ9&#039;)" >placeholder</div> <!-- end child --> </div> </cfsavecontent> <cfset matches = reMatchNoCase( '<!-- start child -->.*<!-- end child -->', parentHTML )[1] />

When running in BL, it generates the error:

Array index [1] is out of bounds for an array of length [0]

Activity

Brad WoodMarch 11, 2025 at 9:22 PM

how is this one going? Let me know if you don’t have time to dig into it.

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Sentry

Created March 8, 2025 at 10:47 PM
Updated March 12, 2025 at 6:27 PM
Resolved March 12, 2025 at 6:27 PM