You are here: PSPad forum > English discussion forum > Re: Multi-Line Search Add-On

Re: Multi-Line Search Add-On

Goto Page: PreviousFirst...7 8 9 10 11 12 13 14 15 16 17

#161 Re: Multi-Line Search Testers Needed

Posted by: vbr | Date: 2018-01-28 16:26 | IP: IP Logged

Hi,
I am currently not using PhReplace and am not sure about the supported regex features, but it seems, that there are several possibilities for fine-tuning the regex pattern you are using:
instead of:
src="./(.*)_files/
you may try:
src="./(.*?)_files/

*? means a non-greedy quantifier - it matches as little as possible, instead of the * meaning as much as possible.

if this is not supported in PhReplace (or the underlying VBScript), you may adjust the pattern in other ways, e.g.:
src="./([^>]*)_files/

in this case, any characters except of > are allowed -
if you know, that the paths to match are inside of html tags, i.e. the match should not contain a closing > (this will, however, also fail if > is somehow part of the tag content, e.g. label, etc.; I believe, this shouldn't happen normally).

hth,
vbr

erkange:
Hello all,

I work with hundreds of html files.
I download them to local folder. Now i want to use one folder for images.
So i want to change all image sources in the file

Source
<img alt="Product Image" src="./A57M_files/guven.jpg" width="700">

What i want
<img alt="Product Image" src="./images/guven.jpg" width="700">

to find this is use that regular expression
src="./(.*)_files/

It works ok but if there are 2 images then it founds both.
like this
<img alt="Product Image" src="./A57M_files/deneme.jpg" width="700"><img alt="Product Image" src="./A57M_files/test2.jpg" width="700">

It founds this;
src="./A58M-E_files/guvenpc1.jpg" width="700"> <img alt="Product Image" src="./A58M-E_files/

But i don't need after first ", how i make it stop after first " character.
and found only this and stop src="./A57M_files/

Options: Reply | Quote | Up ^


#162 Re: Multi-Line Search Testers Needed

Posted by: joemarfice | Date: 2021-03-31 20:06 | IP: IP Logged

Installing the latest version of PSPad (5.05 (533) 2/7/2021) broke phReplace for me. The script won't bring up its window, whether I use the key combination or directly choose it from the Scripts menu. Other scripts still work.

When I try to register the dll from the PSPad folder using the cmd-window command
> regsvr32 "phreplace.dll"
I get a popup error window named "RegSvr32":

Quote:
The module "phreplace.dll" was loaded by the call to DllRegisterServer failed with error code 0x80004005.

Help, please?

Options: Reply | Quote | Up ^


#163 Re: Multi-Line Search Testers Needed

Posted by: pspad | Date: 2021-03-31 20:26 | IP: IP Logged

Try to run command prompt as admin
Use whole path to dll:
Regsvr32 "drive:\path\phpreplace.dll"

Edited 1 time(s). Last edit at 2021-03-31 20:27 by pspad.

Options: Reply | Quote | Up ^


#164 Re: Multi-Line Search Testers Needed

Posted by: joemarfice | Date: 2021-04-12 13:30 | IP: IP Logged

Installing 5.06 fixed the problem, without reinstalling the driver at all.

Options: Reply | Quote | Up ^


#165 Re: Multi-Line Search Add-On

Posted by: techera | Date: 2021-06-16 11:04 | IP: IP Logged

When comparing Atom vs PSPad, the Slant community recommends Atom for most people. Even seemingly core packages, like those taking care of search and replace functionality, can be forked on GitHub, and Multi-line select and edit.

Options: Reply | Quote | Up ^


#166 Re: Multi-Line Search Add-On

Posted by: pspad | Date: 2021-06-16 11:39 | IP: IP Logged

techera:
When comparing Atom vs PSPad, the Slant community recommends Atom for most people. Even seemingly core packages, like those taking care of search and replace functionality, can be forked on GitHub, and Multi-line select and edit.

Atom is based on JavaScript, it's totally different from PSpad.

Options: Reply | Quote | Up ^


Goto Page: PreviousFirst...7 8 9 10 11 12 13 14 15 16 17





Editor PSPad - freeware editor, © 2001 - 2021 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR