Regular expression for string not starting with 0 or any digit

Hi, I need to get a string which should not preceded with Zero or “El” or any other digit.
REGEX.txt (262 Bytes)
Is there any regex to handle this?

Hi!

I’d advise using chat-gpt or the copilot in Edge to help you construct regex’es.
You can also use this site regex101: build, test, and debug regex

Here’s an expression to get you started:

^(?![0-9]|El).*$
1 Like
^[^0][\w ]*$

This Regex returns the last sentence that does not start with a 0.

image

Hi @Lalitha_Selvaraj

Regards,

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?m)^(?!\d|El).*").Value

Regards,

@Lalitha_Selvaraj

System.Text.RegularExpressions.Regex.Match(Input,"^(?!((El)|(\d+))).*",System.Text.RegularExpressions.RegexOptions.Multiline).Value

Regards,

Thanks all. Its working.

@Lalitha_Selvaraj

Glad to be helped. Can you please mark it as solution to close the loop.

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.