জয়েন লগইন

সি++ \w রেজেক্স

🌈সি++ \w রেজেক্স কি?

📋সি++ \w রেজেক্স হলো শব্দের অক্ষর খুঁজে বের করার পদ্ধতি।

⚒️সি++ \w রেজেক্স শব্দের অক্ষর খুঁজে বের করতে ব্যবহৃত হয়।

সি++ \w রেজেক্স শব্দের অক্ষর খুঁজে বের করার উদাহরণ।

cpp
#include <iostream>
#include <string>
#include <regex>
using namespace std;

int main() {

  std::string text = "এওই@#123";
  std::regex pattern("\w");

  for (std::sregex_iterator it(text.begin(), text.end(), pattern), end;
    it != end; ++it) {
    std::cout << it->str() << std::endl;
  }
}