Hello Team,
need Regex for below string
String value str=" Barbara Allen (Future Resident) "
Required out put as = Barbara Allen
note - that spaces and names are changes dynamically
please help me on these regex
Thanks in Advance
Regards
Sai
Hello Team,
need Regex for below string
String value str=" Barbara Allen (Future Resident) "
Required out put as = Barbara Allen
note - that spaces and names are changes dynamically
please help me on these regex
Thanks in Advance
Regards
Sai
Syntax:
Assign -> str =" Barbara Allen (Future Resident) "
Assign -> Output = System.Text.RegularExpressions.Regex.Match(str, "[A-Za-z ]+(?=\()").Value.Trim()
Both the variables are of DataType System.String
Regards
Can you try this
[A-Za-z]+\s?[A-Za-z]+(?=\s+\()
System.Text.RegularExpressions.Regex.Match(str, "[A-Za-z]+\s?[A-Za-z]+(?=\s+\()").Value
Regards,