I tried with this : /[menu-item-\d*] but its not matching
Asked
Active
Viewed 19 times
-4
-
1Did you escape `[`? See https://regex101.com/r/ayD0dQ/1. Or maybe you just forgot to remove `[` and `]`? https://regex101.com/r/ayD0dQ/2 – Wiktor Stribiżew May 06 '22 at 11:55
-
"menu-item-4833" in this string 4833 is dynamic one – MADHU kandukuri May 06 '22 at 11:56
-
You already have `\d*` that matches zero or more digits. It is not a problem here. – Wiktor Stribiżew May 06 '22 at 11:56
-
1Simply use: `menu-item-\d*`. Incase if `menu-item-` is fixed and `4833` is dynamic. – Avinash May 06 '22 at 12:00
-
regular expression string is "menu-item-4833" its not matching with this regex : menu-item-\d* – MADHU kandukuri May 06 '22 at 12:02
-
1Check here: https://regex101.com/r/1eZsgI/1. Your input string is matching using `menu-item-\d*`. – Avinash May 06 '22 at 12:03
-
in place of insert your regular expression here : please paste this : menu-item-4833 and its not matching menu-item-\d* – MADHU kandukuri May 06 '22 at 12:05
-
1menu-item-\d* is your regular expression, not menu-item-4833. I think you got those mixed up. – Eskapone May 06 '22 at 12:10
-
Sorry got it thanks every one, its my misunderstanding – MADHU kandukuri May 06 '22 at 12:13