I am trying to learn Regex but I can not wrap my head around a problem that I encountered. I am looking up a name on Wikipedia using the roman alphabet, and I want to extract data written in Japanese kanji.
For example, this section on wikipedia, I have managed to only get the data within “()”, but with the current Regex I have written I am only available to get the first character of the data inside of “()”.
This is an example of the Wikipedia result:
“Yuta Taki (滝 裕太, Taki Yuta, born August 29, 1999) is a Japanese football player.”
Result I wish to grab using Regex or similar solution:
“滝 裕太”
The current Regex I am using is:
system.Text.RegularExpressions.Regex.Match(googleName,“\w”).ToString
and what I manage to get from that is only:
“滝”
If more information is needed please let me know because I would really like to know how to solve this!
Thank you for your quick response and also for providing me with 2 different solutions.
I will try both of them out and see which one works the best with what I am trying to create and get back to you whether it works as I have thought or not!
To get Group 1:
INSERTVARIABLE(0).Groups(1).ToString
From the Matches Activity, use a write line activity (or an assign activity) and update the capital letters above with the Result from the Matches Activity.
I added the first solution you sent me to my automation and it works like a charm. Thank you so much for your help and and teaching, and I will make sure to study more Regex on my own so I can solve these kind of problems by myself in the future!