In my pipeline I have a variable abd with value "xyz #123". I need to get only numeric value after special character #, How do I achieve this in Jenkins Pipeline?
abd
xyz #123
#
You can do this in Groovy fairly simply (if your string always matches that pattern):
abc.substring(abc.indexOf('#') + 1, abc.length())
That will give you the string 123.
1.4m articles
1.4m replys
5 comments
57.0k users