Skip to content

RegEx parsing of cmdline fails if argument contains "_" #361

Description

@DGRFL

Following yaml is used to extract arguments Cell / Node / Server from a Websphere App Server commandline.
`
process_names:

  • name: "{{ .Matches.cell }}:{{ .Matches.node }}:{{ .Matches.server }}"
    cmdline:
    • '-Dosgi.configuration.area=/apps/profiles/(?P(?P[A-Za-z0-9]+)Node[0-9]+)/servers/(?P[^/]+)/configuration'
      `
      is matching for "nodeagent" "msg1" but not for "bsSN_DC1_1".
      When testing on regex101.com, there is a match and "server" is extracted.

I tried replacing
/(?P[^/]+)/
with
/(?P[A-Za-z0-9_]+)/
But no success.
ANy idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions