I made this regex
/(?<now>^now\(\))|(?<snap>@[s,m,h,d,mon,y]+\b)|(?<time>(\+|\-)\d+[s,m,h,d,mon,y]+\b)/gi
to match now()+1d@m+10h+1s
but the groups don't seem to work. What am I doing wrong?
- How do I get the values as individual groups?
A site where you can share knowledge
I made this regex
/(?<now>^now\(\))|(?<snap>@[s,m,h,d,mon,y]+\b)|(?<time>(\+|\-)\d+[s,m,h,d,mon,y]+\b)/gi
to match now()+1d@m+10h+1s
but the groups don't seem to work. What am I doing wrong?
Comments
Post a Comment