|
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. : 2:09 pm] Moose -- NudeRaiderNudeRaider shouted: makes the char before it optional Not in this context. Dem0nDem0n shouted: ? means zero or more of Not in any context.[2016-4-24. : 2:04 pm] Clokr_ -- RoyRoy shouted: I'd have done (?<=<[ap][^>]*>.*)\r\n(?=[^<]*</[ap]>) How does the ? thing work?[2016-4-24. : 1:52 pm] NudeRaider -- that was the final version Clokr_Clokr_ shouted: Ok this works: replace <p id="toptext">(.*)\r\n(.*)</p> by <p id="toptext">$1$2</p> NudeRaiderNudeRaider shouted: I just need to add the <br> to the replace [2016-4-24. : 1:50 pm] NudeRaider -- RoyRoy shouted: Are you only trying to match one occurrence of a line break? ideally it would replace all occurrences, but I didn't mind running it 5 or 6 times until no more matches were found.[2016-4-24. : 1:43 pm] NudeRaider -- you know what sounds more boring? Doing that same match in 1000 files ![]() [2016-4-24. : 1:42 pm] NudeRaider -- I'm done now, but I was trying to match \r\n inside 2 different html tags[2016-4-24. : 1:40 pm] NudeRaider -- regex just seemed easier accessible considering I've never used an xml editor before and wouldn't even know one by name.[2016-4-24. : 1:38 pm] NudeRaider -- I haven't tried, although I'm aware that that would be the way to go.[2016-4-24. : 12:46 pm] Clokr_ -- I'm migrating some classes from managed C++ to C++/CLI and find&replace is helping a lot ![]() [2016-4-24. : 12:45 pm] Clokr_ -- Most complicated reg exp I had to use so far was ([\s\(])([\w:]+[\s]*)\^([\s\w]+)\[\][2016-4-24. : 12:39 pm] NudeRaider -- awesome. Being the regex pro I am ( )I also included the deletion of multiple spaces that came from indenting the next line after the removed line feed[2016-4-24. : 12:33 pm] NudeRaider -- I should note, that the link always changes. So you can (have to) shorten to <a href="([^<]*)\r\n([^<]*)</a>[2016-4-24. : 12:25 pm] NudeRaider -- Clokr_Clokr_ shouted: I mean if there is a <a> tag inside another <a> tag. no[2016-4-24. : 12:25 pm] NudeRaider -- unless you mean like <td>...<a> ... </td> ... </a> that doesn't happen, fortunately[2016-4-24. : 12:24 pm] NudeRaider -- yup. incase of the <a> tag, it is embedded into a <td> which is embedded into a <tr> etc.[2016-4-24. : 12:19 pm] NudeRaider -- hm seems I have run out of logic. Problem is it finds lines that are fine (and close with a </a>), then end with \r\n and then the next correct line has the </a> tag again. Problem is the </a> to end the expression isn't unique anymore so it'll just parse 2 fine lines into one that it thinks needs fixing.[2016-4-24. : 12:17 pm] Clokr_ -- You can try to exclude </a> from the .* groups, but I don't know if notepad will handle that right[2016-4-24. : 12:06 pm] NudeRaider -- Finding href="(.*)\r\n(.*)</a> marks the text from href to the SECOND </a> tag it finds[2016-4-24. : 12:06 pm] NudeRaider -- hm... next problem. Basically the same, but apparently not exactly. I need to replace the linefeeds inside an <a href="texttolink"> </a> tag. It's wrapped inside another tag so the line doesn'st start with <a href... but that doesn't seem to be a problem[2016-4-24. : 11:30 am] NudeRaider -- worked too. Just ran it a couple of times. Thanks a lot. Saved me a ton of manual work[2016-4-24. : 11:27 am] NudeRaider -- Ha! that's it! Great work you two. Now lets see how it works on multiple files.[2016-4-24. : 11:25 am] NudeRaider -- Clokr_Clokr_ shouted: Ok this works: replace <p id="toptext">(.*)\r\n(.*)</p> by <p id="toptext">$1$2</p> actually, wait, I misread that. it's almost working[2016-4-24. : 11:24 am] NudeRaider -- Clokr_Clokr_ shouted: Ok this works: replace <p id="toptext">(.*)\r\n(.*)</p> by <p id="toptext">$1$2</p> <p id="toptext">$1$2</p> still finds no match. I'm 6.5.5[2016-4-24. : 11:20 am] NudeRaider -- strangely it matches the 3 parts individually. Some syntax change necessary?[2016-4-24. : 11:20 am] Clokr_ -- Ok this works: replace <p id="toptext">(.*)\r\n(.*)</p> by <p id="toptext">$1$2</p>[2016-4-24. : 11:19 am] NudeRaider -- oh man, UltraEdit matches neither (.*<p id="toptext">.*)\r\n(.*</p>)? nor without ?[2016-4-24. : 11:19 am] Lanthanide -- because we're explicitly trying to match the new line character itself, not just as part of the wildcard set[2016-4-24. : 11:18 am] Lanthanide -- but if it means, . will also include the new line character, then it's still not useful in this case[2016-4-24. : 11:15 am] Clokr_ -- LanthanideLanthanide shouted: Clokr_ but it may not be able to do find-and-replace across lines You are right, it doesn't handle new lines well at all...[2016-4-24. : 11:12 am] NudeRaider -- that stupid ad page after installing UltraEdit: "Thank you for installing UltraEdit! By the way, has anybody ever told you you've got great taste?"[2016-4-24. : 11:11 am] Lanthanide -- or at least, it's handled everything I've thrown at it; which isn't a lot and none of it has been super complex, but I've not had any problems with it |
Moose