Hello,
I need a help in a regex that removes all my characters in a string before the first number.
Example:
Input:“this is a test string for 1 word”
output:“1 word”
Thanks in advance!
Hello,
I need a help in a regex that removes all my characters in a string before the first number.
Example:
Input:“this is a test string for 1 word”
output:“1 word”
Thanks in advance!
Kindly try the below,
\D*(?=\d)
The above regex will fetch the non-digit characters before a digit, which can be removed or replaced as per your need.
Hope this helps.
Thanks
#nK
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.