Thanks, but this is all greek to me unfortunately. I checked the expression on the site you linked me to, and the first part makes sense. I don't understand what the last part (\&|\#|$) is doing entirely.
/
user=(.*@([\w*\.]*))(\&|\#|$)
/
gm
user= matches the characters user= literally (case sensitive)
1st Capturing Group (.*@([\w*\.]*))
.* matches any character (except for line terminators)
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
@ matches the character @ literally (case sensitive)
2nd Capturing Group ([\w*\.]*)
Match a single character present in the list below [\w*\.]*
* Quantifier — Matches between zero and unlimited times, as many times as possible, giving back as needed (greedy)
\w matches any word character (equal to [a-zA-Z0-9_])
* matches the character * literally (case sensitive)
\. matches the character . literally (case sensitive)
3rd Capturing Group (\&|\#|$)
1st Alternative \&
\& matches the character & literally (case sensitive)
2nd Alternative \#
\# matches the character # literally (case sensitive)
3rd Alternative $
$ asserts position at the end of a line
Global pattern flags
g modifier: global. All matches (don't return after first match)
m modifier: multi line. Causes ^ and $ to match the begin/end of each line (not only begin/end of string)