Copy the line above using Word Find and Replace - replace

i want to find whats comes after the ":" in the "x:" and copy it to "y:"
So lets say i have
*Using wildcards
x:hello my friends thanks for helping me
y:
x:Thank you very much
y:
how can i use Find and Replace to copy it so the outcome will be
x:hello my friends thanks for helping me
y:hello my friends thanks for helping me
x:Thank you very much
y:Thank you very much

Related

Google sheets - Conditional Formatting "less than" not working properly when used on range

t Hey guys, im getting mad about something really simple. Why does this plain conditional formatting light up the values 15 and 12? When applied only for cell D1 or F1 it works properly, I'm really clueless. Thank you for your advice!
Also my greetings got deleted everytime after saving the edit, I had to put a random letter in front so it got through, whats up with that random behaviour lol
instead of your:
=A1
use:
=$A1

Irc Link Protect Script - Space after TLD

I'm quite new to coding but i'm makin' my way through it :)
So here is my problem.
I'm using this code which is working perfectly except this one little thingy. Links are being blocked also if it is the ending of a sentence like:
this.communication works well
It should only match if there is a space/blank after the TLD.
on $#*:text:*:#:{
if ($regex($1-,/.+\.(ftp|thalia|com|ly|ml|gl|tk|ga|biz|co|net|org|gov|tv|edu|fm|myftp|myftp.biz)/iS)) && ($nick !isop $chan) {
if (!$istok(%permit,$nick,32)) {
.timerban 1 1 /msg $chan /ban $nick
msg $chan $Nick , posting links without permission is not allowed.
}
}
Maybe you guys can help me and I think i isn't a big issue but I'm searching for weeks now and can't find anything!
Big thanks in advance and sorry .. english isn't my native language.
Cheers, Marv
You can use
/.+\.(ftp|thalia|com|ly|ml|gl|tk|ga|biz|co|net|org|gov|tv|edu|fm|myftp|myftp.biz)( |\/|\n|\r)/iS
instead so it needs that the string has a space, a / or a newline.

powermail and the special characters

I have this known issue with special characters < > " & and the powermail extension in Typo3. I already googled and found that it's related to double trigger of the htmlspecialchars in 2 files. I tried many suggestions but they just didn't help.
- removed htmlspecialchars from class.tx_powermail_html.php.
- removed it from class.tx_powermail_markers.php.
- ...
does somebody has an exact solution to this issue?
thanks in advance.
Ps: I am using v. 1.6.9 on typo3 4.5
well ,
I could find an answer in case somebody faces the same problem. Just comment out both appearances of "htmlspecialchars" in the function sec() in "lib\class.tx_powermail_functions_div.php".
That should fix it

(Homework) Easiest way to format a table-like list and a logic issue?

So, my teacher gave us a document for an assignment due this Tuesday. Unfortunately its not very clear. I have a strong grasp of the basics of programming, but not with C++. Here are my questions.
1.) Right now I clear the screen with system("cls"), and I print the menu screen with spaces and \n for formatting. The doc says to look up something called stdlib.h and a clrscr() function and how it can be used for clearing lines i.e. clrscr(4).....
I found nothing on google, do you guys know what he's talking about?
2.) What is the easiest way to format a table-like list in C++? Example of what I am trying to achieve here:
The way it outputs each line is in 3 different cout's, first one with t: x and the 1st number, second one tacking on the 2nd number to the right, and third one tacking on the last number and endl. This will then loop until some parameter is met.
3.) Is my logic above sound? The problem is, I do not understand the assignment doc he provided, and my e-mails remain unanswered. So I've tried to just do it as intuitively as I can and thats what I came up with. Here is the snippet from the doc that I don't get:
I know its kind of an intricate issue I'm having so if you would like some more context for the last screenshot please let me know.
Any help is appreciated, thanks!
1.) Right now I clear the screen with system("cls"), and I print the menu screen with spaces and \n for formatting. The doc says to look up something called stdlib.h and a clrscr() function and how it can be used for clearing lines i.e. clrscr(4).....
try using cplusplus.com, it is awesome and will answer a lot of your questions.
http://www.cplusplus.com/reference/cstdlib/?kw=stdlib.h
2.) What is the easiest way to format a table-like list in C++?
Well personally, I think using the following function:
setw()
would be the best way to go about making a chart like that.
I feel this is better than just doing "\t" or " ",
because it will do work more efficiently, and in a organized manner.
Let's put setw() and "\t" to the test:
Let's say we have values 8 and 10,000 and want to print the values.
cout << "\t" << "8";
cout << "\t" << "10000";
will output:
8
10000
while if you had:
cout << setw(8) << "8";
cout << setw(8) << "10000";
it would output:
8
10000
It's just an issue of keeping your code organized and looking nice.

boost regex match non-whitespace and angle brackets

I may be asking a duplicate question, but I've spent a couple of hours googling this to no avail!
I'm trying to extract a string from some SIP URLs parsed by a program I'm working on. Here's an excerpt of the code. I'm passing in sipUrl, and have all the right includes etc:
static const boost::regex sipRegExp ("(sip:\\S+?#(?=\\S)[^>]+);");
boost::cmatch result;
boost::match_results<string::const_iterator> results;
boost::match_flag_type flags = boost::format_perl;
string newSipUrl;
cout << sipUrl << endl;
bool toggle = boost::regex_search(sipUrl, result, sipRegExp, flags);
if (toggle) {
cout << result[1].str() << endl;
newSipUrl = result[1].str();
}
cout << "new url: " << newSipUrl << endl;
I'm basically trying to extract the sip:user#IP from strings like "\"alex#192.168.1.2\"<sip:alex#192.168.1.2>;tag=fe310852" or "\"bob\"<sip:bob#foo.com>;", however, I can't get it to match! It worked fine when I wasn't using lookahead to try and remove the last angle bracket, but ever since then it fails to match.
Posting this just before running out of the door, so it may need more info. If anyone can spot something glaringly obvious, then that'd be a great help! And please feel free to point me at links that I might have missed!
Have you tried something simpler such as regex against:
`sip:[a-zA-Z]*#[0-9a-zA-Z.]*`
works on terminal but haven't tried it through boost yet. If you start of with something simple then add bit by bit to make it more specific then it will be easier to track which part of the regex isn't working.
You missed the > before the semicolon:
"(sip:\\S+?#(?=\\S)[^>]+)>;"
Although actually you probably don't need the semicolon at all. Something like Scott's answer should be sufficient.
I ended up going with a modification of #David Knipe's comment - the winning regex was:
sip:\\S+#[^\\s>;]+
Which matches with or without angle brackets, up to the colon. Both answers provided did work, but being able to remove the lookahead was quite nice. I also went with the + modifiers to make some effort to find a valid URI and not a blank one.
Thanks for the help!