I posted earlier a question regarding XOR in perl strings ...

To help make clear the context of XOR here, could you please post a link to the prior (and possibly related) thread?

... I have a string of the type "hello %f.2f world". I want to xor everything but any regex that seems like [\%0-9a-z\.\ \=]. So in this case "hello" and "world" shoul be "xored" but not the rest.

I don't understand this. Do you want to do some string-xor operation(s) on some parts of the string that do not match the  [\%0-9a-z\.\ \=] character class? In that case, I can't see any character that doesn't match; the entire string matches, including 'hello' and 'world'.

If you have two parts of a string and you xor them together, what's supposed to happen to the result? WRT string-xoring, if you have two unequal-length strings to xor, what is supposed to happen? (I'm sure I have other areas of misunderstanding.)

Update: Oh, wait... Maybe I should have read Newest Nodes bottom-to-top instead of vice-versa. Does this pertain to Encrypt/decrypt string in C and Perl?


Give a man a fish:  <%-{-{-{-<


In reply to Re: Partial Xor in string by AnomalousMonk
in thread Partial Xor in string by kepler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.