I want to remove a single * character and any white space from the start of a string.
This is the regex I have /^\*{1}(?:\s+)?/
Here's a Rubular link http://rubular.com/r/r5i4FpQdK2
However Ruby is throwing a warning when I try to use it.
001:0> regex = /^\*{1}(?:\s+)?/
warning: nested repeat operator + and ? was replaced with '*': /^\*{1}(?:\s+)?/
=> /^\*{1}(?:\s+)?/
The actual test still works
002:0> "* foo" =~ regex
=> 0
but I can't figure out what's causing the warning.
Any advice would be appreciated.