Regular Expressions 101

Community Patterns

ofstream ifstream file C++

2

Regular Expression
Python

r"
(?P<first_part>(?:ifstream|ofstream)\s+[0-9a-zA-z_]+\s*\()(?:\"(?P<file_name>[0-9a-zA-z_.]+)\")
"
g

Description

match ofstream of("test.txt", ios_base::app); ofstream of("test.txt", ios_base::trunc); ofstream of("test.txt", ios_base::binary);

Submitted by Денис Суховерхов - 8 years ago