Relative Content

Tag Archive for regex

Conditional regex to distinguish between null and a value

I’m working on a REST api that has a GET endpoint to search for trades in the context of stock exchanges.
It supports dynamic filtering so the client can set the trade field(column), comparison operator and comparison value
he wants.
e.g. Result -eq [Win] or Result -eq [BreakEven]
The operator must start with a dash and the comparison value must be surrounded by square brackets.
Everything within the square brackets will be treated as a value.
e.g. [some-value with whitespaces, "double quotes" and [] within] are totally fine.
Between the three components of the filter there must be at least one whitespace.

Reference – What does this regex mean?

This question’s answers are a community effort. Edit existing answers to improve this post. It is not currently accepting new answers or interactions. What is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from […]

Learning Regular Expressions [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]

Regex is not finding what I need

I need to be able to find a letter+7digits with any characters after the 7th digit except 0-9 and A-Z. So it need to be ignored/not found if there is any of characters after 7th digit is 0-9 and A-Z