Problem with get text after specific word?

Hi,everyone

My problem is , I want to text from text after the word “TOTAL RECORDS” as pic it should be get “4”
but result in message box is “TOTAL RECORDS”
Variable
xxOutput = output from screen scraping
xxMessageBox = System.Text.RegularExpressions.Regex.Match(xxOutput.ToString,”TOTAL RECORDS = ”).ToString.Trim

Substring

@Supakinee_Navawong_na_ayu
give a try on this pattern
grafik

2 Likes

It’s still not work. Output is blank.
May I did something wrong?
xxMessageBox = System.Text.RegularExpressions.Regex.Match(xxOutput.ToString,”(?<= TOTAL RECORDS = )\d+ ”).ToString.Trim

Form message text
Catetory invalid. ORA-01403: no data found
Error CA002-005: Non-Existent Segment Value

TOTAL RECORDS = 4
COMPLETE = 0
ERROR = 4

I found this solution.
xxMessageBox= System.Text.RegularExpressions.Regex.Match(xxOutput.Trim,“(?<=TOTAL RECORDS = ).+”).ToString

Thank you for your suggestion. ^^

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.