c# - Regex validation and retrieval -


i have regex string in c# like:

ove.com: purchase confirmation \([0-9a-za-z\s\.]+ [0-9a-za-z]{17} peddle llc\) 

now, want retrieve value formed [0-9a-za-z]{17} in regex.

how can that?

so want select part of regex after matched. can add parentheses around part.

int indexval = 0; regex re = new regex(@"([0-9a-za-z\s.]+ ([0-9a-za-z]{17}) peddle llc)") match m = re.match(s) if(m.success) {   indexval = int.tryparse(m.groups[1].tostring()); } 

group index might wrong, don't kill me. copied code here: how retrieve selected text using regex in c#?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -