Can someone please enlighten me, I tried a lot of thing but this doesn't work. I'll give the example I'm getting an error:
let str = `First example (working): {Æ¢ Example phrase 123 áè -*, example Æ¢}
Second example (not working): {Ƣ A SuperSlim notebook computer that's light on weight, heavy on features and performance *This .9 thin Notebook Computer weighs in at roughly 3 pounds - which might make you wonder how they cram such great features into that small package *10.4 XGA Active matrix screen with XBRITE display technology *Intel Pentium 300 MHz processor with MMX technology *64 MB of SDRAM is included (expandable to 128 MB maximum) *6.4 GB fixed Hard Drive for Data Storage *Touch Pad with pen operation *One Type II PC card slot with Cardbus Zoomed Video support *External 1.44 MB floppy disk drive *integrated 56K V.90 Data/fax Modem for Internet access *512 KB MultiBank DRAM Cache memory *16-bit, Soundblaster compatible audio *MPEG1 Digital video that supports full screen playback *mono speakers *Built-in microphone *Infrared port *Responsive nearly full-size tactile Keyboard *programmable power key for unattended Email retrieval Please add $30 for shipping. Payment - western union. Ƣ}`
// Regex
console.log(
str.match(/{Æ¢\s*([^(Æ¢)]*)\s*Æ¢}/g));
I am trimming the spaces and getting everything inside the curly brackets followed by "Æ¢" until "Æ¢}" The result is only the first example in the string, and it doesn't include the second:
> ["{Æ¢ Example phrase 123 áè -*, example Æ¢}"]