Members in Shoutbox
None.

Shoutbox Search
Search for:


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.
Pages: < 1 « 1754 1755 1756 1757 17583572 >

[2016-4-24. : 2:09 pm]
Moose -- NudeRaider
NudeRaider shouted: makes the char before it optional
Not in this context. Dem0n
Dem0n shouted: ? means zero or more of
Not in any context.
[2016-4-24. : 2:08 pm]
Roy -- In the context I used them, they're lookbehinds and lookaheads.
[2016-4-24. : 2:08 pm]
Roy -- No it doesn't.
[2016-4-24. : 2:06 pm]
Dem0n -- ? means zero or more of
[2016-4-24. : 2:06 pm]
NudeRaider -- makes the char before it optional
[2016-4-24. : 2:04 pm]
Clokr_ -- Roy
Roy 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>
NudeRaider
NudeRaider shouted: I just need to add the <br> to the replace
[2016-4-24. : 1:50 pm]
NudeRaider -- Roy
Roy 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:48 pm]
Roy -- Are you only trying to match one occurrence of a line break?
[2016-4-24. : 1:47 pm]
Roy -- I'd have done (?<=<[ap][^>]*>.*)\r\n(?=[^<]*</[ap]>)
[2016-4-24. : 1:47 pm]
Dem0n -- ya
[2016-4-24. : 1:47 pm]
NudeRaider -- http://i.imgur.com/xJVT0jS.jpg memes?
[2016-4-24. : 1:46 pm]
Dem0n -- Moose, early morning memes? LMAO
[2016-4-24. : 1:44 pm]
Moose -- :wob:
[2016-4-24. : 1:43 pm]
NudeRaider -- tbh lanth and clokr_ did most of the work
[2016-4-24. : 1:43 pm]
NudeRaider -- you know what sounds more boring? Doing that same match in 1000 files :P
[2016-4-24. : 1:43 pm]
Roy -- Sounds boring. Glad you figured it out.
[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:41 pm]
Roy -- What are you trying to match?
[2016-4-24. : 1:41 pm]
NudeRaider -- plus, who wouldn't appreciate a hacky solution ;)
[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. : 1:37 pm]
Roy -- Have you tried using an XML parser instead of Regex?
[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 :P
[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:44 pm]
Clokr_ -- Hahaha good job (?)
[2016-4-24. : 12:39 pm]
NudeRaider -- awesome. Being the regex pro I am ( :P )I also included the deletion of multiple spaces that came from indenting the next line after the removed line feed
[2016-4-24. : 12:36 pm]
NudeRaider -- Thanks, seems to work!
[2016-4-24. : 12:33 pm]
Clokr_ -- Yeah sure, I'm leaving all the minor modifications to you :P
[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:31 pm]
Clokr_ -- Try this: <a href="texttolink">([^<]*)\r\n([^<]*)</a>
[2016-4-24. : 12:27 pm]
NudeRaider -- :P
[2016-4-24. : 12:27 pm]
Clokr_ -- I have absolutely no idea. I'm learning reg exps too :P
[2016-4-24. : 12:27 pm]
NudeRaider -- to exclude a > from the match all?
[2016-4-24. : 12:27 pm]
NudeRaider -- about the exlusion... how does that work? like .*[^>]
[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:25 pm]
Clokr_ -- I mean if there is a <a> tag inside another <a> tag.
[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:23 pm]
Clokr_ -- Are there nested a tags?
[2016-4-24. : 12:23 pm]
Clokr_ -- Yeah reg exps will do really badly with nested structures.
[2016-4-24. : 12:21 pm]
NudeRaider -- that properly identifies tags
[2016-4-24. : 12:20 pm]
NudeRaider -- at that point I probably should use an xml editor :P
[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:29 am]
Clokr_ -- :)
[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 -- I just need to add the <br> to the replace
[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_ -- Using notepad++ with the ". matches newlines" option set
[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]
Lanthanide -- it was on that page
[2016-4-24. : 11:19 am]
Lanthanide -- did you see that ultraedit uses different codes?
[2016-4-24. : 11:19 am]
Lanthanide -- I've got 5.9.3
[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:19 am]
Clokr_ -- I'm using v6.4.5
[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:18 am]
Lanthanide -- not in the version I have
[2016-4-24. : 11:17 am]
Clokr_ -- Have you guys tried that?
[2016-4-24. : 11:17 am]
Clokr_ -- Wait, there is a checkbox that says ". matches newline"
[2016-4-24. : 11:15 am]
Clokr_ -- Lanthanide
Lanthanide 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 -- :lmfao: 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
[2016-4-24. : 11:11 am]
NudeRaider -- yeah

Pages: < 1 « 1754 1755 1756 1757 17583572 >


Members Online: Moose