i want to know the meaning of query Regex_Replace([Reported POS Record - SKU],"(.*)(\s)(.*)",'$1'). what this expression do?
Hey @sonu2801, this expression will replace the [Reported POS Record - SKU] field value with everything up until the final space.
(.*) - zero or more of any character
(\s) - a space
(.*) - zero or more of any character again
The parenthesis here denote a capturing group. $N is then used to reference capturing groups, therefore $1 takes the first i.e. the initial (.*).
thanks can you plese explin this also Regex_Replace([Reported POS Record - SKU],"(.*)([E])([0-9]+)([^0-9])(.*)",'$2$3')
Sure @sonu2801, these capture groups are:
1. (.*) - zero or more of any character
2. ([E]) - an E
3. ([0-9]) - one or more of any number
4. ([^0-9]) - a single character that is not a digit 0-9
5. (.*) - zero or more of any character
The replacement is referencing capture groups 2 & 3, therefore the statement as a whole will substitute the [Reported POS Record - SKU] value with E & all of the numbers following it.
User | Count |
---|---|
107 | |
82 | |
70 | |
54 | |
40 |