skyman: -------------------------------------------------------------------------------- I assume using reg.ex. will not work for this, but wondering how best to add/subract to multi-line/various time values...
Example: _[color=#B22222]8:45[/color]_ _[color=#B22222]10:13[/color]_ 4608z 0 CR9 Disc. Mar. 1; _Ops [color=#B22222]25 min. earlier[/color]_ eff Feb. 16 or _[color=#B22222]8:45[/color]_ _[color=#B22222]10:13[/color]_ 4608z 0 CR9 Disc. Mar. 1; _Ops [color=#B22222]15 min. later[/color]_ eff Feb. 16 Simple search and replace will obviously work, but many lines/values need to be edited. Perhaps a script, etc. is better for this? Thank you -------------------------------------------------------------------------------- Hi, I guess, you could use scripting for this, depending of the regularity of the patterns to be changed. There are several options for different conditions: - you could try my older javascript replacement script http://www.vbr.wz.cz/pspad/poor-man-s-REplace.html you youd need to check, whether this can used for your data, e.g. the following pattern subtracts 7 from all numbers found in the texts /-?[0-9]+(?:\.[0-9]+)*/g, function($0){return $0 - 7;} or you can use one purpose scripts: - it can be either a series of regex replacements, which would be run one after another; an example is: http://forum.pspad.com/read.php?2,48923,48931#msg-48931 - or you can use a single replace with an universal pattern and have the replace function compute/modify the results an example of the replacement function in javascript could be: http://forum.pspad.com/read.php?2,48382,48386#msg-48386 where it is used to add line numbers; javascript could probably handle the time manipulations too. hth, vbr -- <http://forum.pspad.com/read.php?2,58467,58468> PSPad freeware editor http://www.pspad.com
