#include <iostream>
#include <regex>
#include <fstream>
#include <string>
using namespace std;
int main() {
ifstream fin("f");
string s = "", _temp;
while (getline(fin, _temp))
s += _temp;
fin.close();
ofstream fout("g");
try {
regex re("[a-z]");
sregex_iterator next(s.begin(), s.end(), re);
sregex_iterator end;
while (next != end) {
smatch match = *next;
fout << match.str();
next++;
}
catch (regex_error& e) {
cout << "smth went wrong.";
fout.close();
Поделитесь своими знаниями, ответьте на вопрос:
FIND LENGTH OF LIST x = np.array([5, 7, 8, 7, 2, 17, 2, 9, 4, 11, 12, 9, 6]) y= np.array([99, 86, 87, 88, 111, 86, 103, 87, 94, 78, 77, 85, 8 6}) GREATE DATA FRAME RESHAPE ARANGE RANDOM
#include <iostream>
#include <regex>
#include <fstream>
#include <string>
using namespace std;
int main() {
ifstream fin("f");
string s = "", _temp;
while (getline(fin, _temp))
s += _temp;
fin.close();
ofstream fout("g");
try {
regex re("[a-z]");
sregex_iterator next(s.begin(), s.end(), re);
sregex_iterator end;
while (next != end) {
smatch match = *next;
fout << match.str();
next++;
}
}
catch (regex_error& e) {
cout << "smth went wrong.";
}
fout.close();
}