I'm sorry, but how that can help me?

I've read 1 and 3 points of your list, and just take a look at second point. They don't contain answers on my questions, which is:

1. Is it possible to set pos() value from regexp itself, and how to do it?
2. How can \G assertion help me to change pos() value?

Look like you have misunderstand me.
perldoc -f pos pos SCALAR pos Returns the offset of where the last "m//g" search left + off for the variable in question ($_ is used when the variable +is not specified). Note that 0 is a valid match offset. "und +ef" indicates that the search position is reset (usually du +e to match failure, but can also be because no match has yet + been performed on the scalar). "pos" directly accesses the l +ocation used by the regexp engine to store the offset, so assig +ning to "pos" will change that offset, and so will also influen +ce the "\G" zero-width assertion in regular expressions. Becau +se a failed "m//gc" match doesn't reset the offset, the retu +rn from "pos" won't change either in this case. See perlre and + perlop.
Point is “"pos" directly accesses the location used by the regexp engine to store the offset” and I want to change it.
Second point is
perl -e "\$_='qwerty';s/r/print pos()/e;"
so I can read pos value, and it is logical that I can set it too. But I don't know how to do it, and can't find any examples.

Now about \G which says regexp to start next search from the end of previous. It's main purpose to check several regexp on string, special for that its used with c modifier practically all the time. But in my case all actions make in function which called by regexp. But after then function change string, new search must start from earlier position then pos() value. And I don't understand how can \G help me?
Of course I can miss something, but what?
I'm sorry for my language level, i can't says clearly what exactly I mean. But hope you will understand.

In reply to Re^6: Using pos() inside regexp (no /e) by braveghost
in thread Using pos() inside regexp by braveghost

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.