The regex I prepared for php (I don't know if there is a different build in c ++) on https://regex101.com/:
(?<=deneme\()([^]]+)(?=\))
Target string:
deneme("deneme", 1,2,deneme2(), 3, "3123", sda())
Expected output:
"deneme", 1,2,deneme2(), 3, "3123", sda()
I can't give an example code because I don't know anything about regex in c ++. How can I get the expected output on c ++ based on the examples I gave above?
this code works in c # and gives the output I want. I don't know how to convert it to c ++.
```cs
using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?<=deneme\()([^]]+)(?=\))";
string input = @"deneme(""deneme"", 1,2,deneme2(), 3, ""3123"", sda())";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
```
I can also write a related code with php. but I am also confused in c ++.
```php
$re = '/(?<=deneme\()([^]]+)(?=\))/m';
$str = 'deneme("deneme", 1,2,deneme2(), 3, "3123", sda())';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
var_dump($matches);
```
What I have tried:
I haven't had experience as I don't have enough knowledge of std :: regex to dump what I want into c ++ code.