You are viewing limited content. For full access, please sign in.

Question

Question

Regular Expression (.).*

asked on December 13, 2023

I am reviewing a workflow created by someone else. In a Pattern Matching activity they are using this reg ex pattern   (.).*  to create a token and I do not understand it despite reviewing what each one of those characters do.  Would anyone be able to decipher this? 

Here is the full token:

Token Name:     FLLN

Input:     %(RetrieveFieldValues_Last Name)

Pattern:      (.).*

 

0 0

Answer

SELECTED ANSWER
replied on December 13, 2023 Show version history

Vikki,

The parentheses in the regex expression is a capture group, the period inside the parentheses is any character.  So when you put them together the first part of the regex expression is just matching the first character of the text and returning it as a match.  The remainder of the regex expression really doesn't do anything in this context and can be removed.

Depending on the context that expression could probably be rewritten to be more precise.

3 0
replied on December 13, 2023

Thank you!  The part after the ) was throwing me.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.