23759Re: [Clip] Dot matches newline ON or OFF (was Re: Non printingcharacters.)
- Apr 20, 2013At 4/20/2013 09:57 AM, Axel wrote:
>Art Kocsis wrote:I ran it on Win XP, SP2 both 5.8/fv & 6.2/fv.
>> Now this is very strange!!
>It is! I applied your clip unchanged to my test text from the mail
>before and it worked perfectly.
>I'm using 7.1/fv on Win98SE.
I saw your earlier post after I posted my clip. Interesting that the basic search patterns are almost identical. I added the (?s) override to handle multiple lines, the \s to help insure that it finds a proper tag, made the target non-greedy to prevent problems, and added the "H" parameter to allow for optional preselection.
Axel: ^!Replace "<span[^>]*>(.*?)</span>" >> "<i>$1</i>" R
Art: ^!Replace "(?s)<span\s[^>]*?>(.*?)</span>" >> "<i>$1</i>" IHRS
After verifying that the search pattern worked I was all ready to post it (as the replacement pattern was trivial), but paused to make sure there were no typos in the command when the gremlins hit. I have spent way too much time on this but am concerned about what kind of hidden bug may be involved.
Do you still have any earlier versions installed?
Could some other people try this and report back? A test string is:
<span style='font-family:"Times New Roman Italic","serif"'>(.*?)</span>
I think it's time to reboot and see if anything changes.
Either result is not good but at least it is a data point.
At 4/20/2013 04:18 AM, Hitch wrote:
>It's never the same information inside the span.Hitch, I'll say this once more as you either didn't read carefully or didn't understand. What Axel and I are both trying to tell you is that the pattern "\s[^>]*?>" captures ALL POSSIBLE attributes in the opening tag. It says match all characters EXCEPT a ">" followed by a ">".
To check it out change the ^!Replace to a ^!Find, put the command in a clip and save it, drag the clip to your clipbar, open one of your docs and clip on the clipbar icon. Each time you click it will find the next occurrence. When we get the replace part straightened out, change back to a ^!Replace command, go to the first one you want to change and keep clicking on the icon until done. for those you don't want to change just move the cursor past the current selection. You can modify this to pause at each find (see ^!Skip), and just go through a doc once.
- << Previous post in topic Next post in topic >>