Page 1 of 1

another "seems to work in Notepad++ but not here"

Posted: Thu Aug 18, 2016 2:44 am
by schnarkle
Hello,

on the following text I can search and replace using the below regex but it does no replacement in Textcrawler Pro:

@M_DeathNoticeHed:Alex <\n>Ornelas
@M_DeathNoticeBod:ALAMO <\!-> Alex Ornelas <\n>, 25, died Tuesday, Aug. <\n>16, 2016 at Alamo. Me<\h>morial Funeral Home of <\n>San Juan is in charge of ar<\h>rangements.

@M_DeathNoticeHed:Almaquire Cadena
@M_DeathNoticeBod:RIO GRANDE CITY <\!-> Almaquire <\n>Cadena , 87, died Tues<\h>day, Aug. 16, 2016 at Pax <\n>Villa Hospice, in McAllen, <\n>TX. Sanchez Funeral Home <\n> of Rio Grande City is in <\n>charge of arrangements.

@M_DeathNoticeHed:AnaRose <\n>Collazi
@M_DeathNoticeBod:MISSION <\!-> AnaRose <\n>Collazo , 44, died Wednes<\h>day, Aug. 17, 2016 at Mis<\h>sion Regional Medical Cen<\h>ter in Mission. Virgil Wilson <\n>Mortuary of Mission is in <\n>charge of arrangements.

----
Search param: (@M_DeathNoticeBod:.*)<\\!->
replace: \1—

This replaces the regular dash after the city with an em dash.

Any ideas?

Thanks!

Re: another "seems to work in Notepad++ but not here"

Posted: Thu Aug 18, 2016 9:14 am
by DigitalVolcano
In TextCrawler you use $ to reference the capturing group - e.g. $1

https://msdn.microsoft.com/en-us/librar ... 2147217396

So for your example this works (at least in the RegEx Tester)

Code: Select all

$1— 

Re: another "seems to work in Notepad++ but not here"

Posted: Thu Aug 18, 2016 10:45 pm
by schnarkle
Thank you!