|
Members in Shoutbox
None.
Shoutbox Search
Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper /me > Marks as action Shoutbox Information
Moderators may delete any and all shouts at will.
|
Global Shoutbox
Please log in to shout.
[2016-4-24. : 11:08 am] Lanthanide -- considering how well notepad++ does just about everything else, you'd think they'd spend their effort on fixing the crap bits[2016-4-24. : 11:07 am] Lanthanide -- you could see if that Ultraedit I linked to before is available on windows[2016-4-24. : 11:06 am] NudeRaider -- If I make the closing tag optional it finds a match. And actually does what I want! but it doesn't stop after the tag ![]() [2016-4-24. : 11:04 am] Lanthanide -- Clokr_Clokr_ shouted: I did a fast test and it does match expressions across lines but it may not be able to do find-and-replace across lines[2016-4-24. : 11:04 am] Lanthanide -- in that case it isn't finding the linebreak because there isn't one, so again it doesn't match[2016-4-24. : 11:02 am] NudeRaider -- LanthanideLanthanide shouted: but the pattern requires the final (.*</p>) to be matched NudeRaiderNudeRaider shouted: hm... no must be soemthing else. when I close the first line with a </p> it still doesn't match [2016-4-24. : 11:02 am] Lanthanide -- but since it stops scanning the line, it fails to complete the match, so can't match anything[2016-4-24. : 11:01 am] Lanthanide -- I think it's unable to continue matching after it encounters the \r\n on the line[2016-4-24. : 11:01 am] Lanthanide -- I haven't tried to use Notepad++ for this in a long time, but I remember getting really frustrated by it's inconsistent treatment of new line characters[2016-4-24. : 11:00 am] NudeRaider -- hm... no must be soemthing else. when I close the first line with a </p> it still doesn't match[2016-4-24. : 11:00 am] Clokr_ -- Hey, that reg exp chart is nice. The one in the wikipedia page is quite messy.[2016-4-24. : 11:00 am] NudeRaider -- LanthanideLanthanide shouted: and Notepad++'s inability (IIRC) to do regex over multiple lines may just kill you here i think that's it. While hello world works, (.*<p id="toptext">.*)\r\n(.*</p>) doesn't match anything[2016-4-24. : 10:59 am] Lanthanide -- although actually thinking about it more, maybe that doesn't matter[2016-4-24. : 10:59 am] Lanthanide -- since you need to include the closing tag in the regex if you're not doing an interactive find-and-replace[2016-4-24. : 10:58 am] Lanthanide -- and Notepad++'s inability (IIRC) to do regex over multiple lines may just kill you here[2016-4-24. : 10:57 am] Lanthanide -- in proper regex tools, a simple .* should match the contents of the entire file, but I don't think Notepad++ works like that[2016-4-24. : 10:57 am] Lanthanide -- actually that should be (.*<p if="toptext" etc, the first .* also should be inside the marked section[2016-4-24. : 10:56 am] Lanthanide -- so you probably want to do: .*(<p id="toptext">.*)\r\n(.*</p>) and replace with \1<br>\2[2016-4-24. : 10:54 am] Lanthanide -- so: he(llo wor)ld replaced with \1<br> would result in: llo wor<br>[2016-4-24. : 10:53 am] Lanthanide -- you have to mark the input as having a section, and that becomes a numbered section in the replace text[2016-4-24. : 10:52 am] NudeRaider -- sry if I'm doing some silly beginners mistake but if I search for .*(<p id="toptext">).*\r\n and replace it with <br> the whole line gets replaced (using notepad++)[2016-4-24. : 10:50 am] Lanthanide -- no idea what the tool is, and it doesn't use unix standard formatting for some reason[2016-4-24. : 10:50 am] Lanthanide -- just googled this: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/regular_expressions.html[2016-4-24. : 10:48 am] Lanthanide -- if you're doing it interactively then you can select when the text is replaced or not, so you'd avoid doing stupid replacements[2016-4-24. : 10:47 am] Lanthanide -- if you're doing a massive file, then that would just end up replacing all of the line breaks, which you probably don't want[2016-4-24. : 10:47 am] NudeRaider -- LanthanideLanthanide shouted: and actually, you don't really need to search for the closing tag but then it would replace all line feeds after it found the tag, right? Or just 1? I need any number between 0 and ... say 7 replaced.[2016-4-24. : 10:47 am] Lanthanide -- ah, that would depend if you're doing the find and replace interactively or not[2016-4-24. : 10:46 am] Lanthanide -- and actually, you don't really need to search for the closing tag[2016-4-24. : 10:46 am] Lanthanide -- I think notepad++ had some silly limitations like it could only search for the first linefeed and then it'd stop, and it couldn't be used to put line feeds or tabs in the replacement text |
Sie_Sayoka, Zakerozi