[Cialug] an easier way?

chris at bynw.com chris at bynw.com
Fri Apr 24 21:40:37 UTC 2020


No I haven't because I found additional javascripts that don't match 
that pattern or location.


On 2020-04-24 16:33, David Champion wrote:
> Were you able to try Barry's suggestion (with caveats)?
> 
> He said:
> 
> UPDATE table SET column= SUBSTR(column, 0, LOCATE(column, '<script')) 
> WHERE
> column LIKE '%<script'
> 
> You could test to see what this will do with this query (I think this 
> is
> right, haven't done a lot of mysql lately) :
> 
> SELECT SUBSTR(column, 0, LOCATE(column, '<script')) AS mytest WHERE 
> column
> LIKE '%<script'
> 
> This should show you just the substring that would be replaced in all 
> of
> the records that match.
> 
> -dc
> 
> 
> On Fri, Apr 24, 2020 at 1:34 PM L. V. Lammert <lvl at omnitec.net> wrote:
> 
>> On Fri, 24 Apr 2020 chris at bynw.com wrote:
>> 
>> > I've tried that in a number of different text editors and they all give
>> me the same result. Pattern not found.
>> >
>> sed would work a lot better if you can get the regex figured out, ..
>> 
>>         Lee
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
>> 
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> https://www.cialug.org/cgi-bin/mailman/listinfo/cialug


More information about the Cialug mailing list