In order to expedite an answer to your question, please provide as much of the following information as possible
- What programming language/platform or application are you using?
- What is your ultimate task? What are you working on and what you want to use a Regular Expression for in your planned solution.
- Describe your Regular Expressions-related problem with the task and
what you have attempted so far. Please be fairly descriptive.
- If possible and if it is not an extremely large block of text,
please provide a representative example of the original text you are
trying to process.Do not make up a sample. Do not oversimplify
complexity of your real data. Also show what your desired result
should look like. If you can not provide a sampling of your real data,
describe it as thoroughly as you can.
An Example of a Poorly asked Question:
I need regex to match only characters and numbers.
Why is this a poor question:
- Vague question: characters are anything that can be used in a print
format. Not only do they include numbers, but thousands of other things
- No sample text was provided. A sample of text you are working with
may allow for your otherwise vague question's scope be determined. Plus
it gives the regex writer something to verify/test an offered solution.
And it may give your problem some needed context.
- The programming environment was not mentioned. Be Aware Regular
Expression support is not uniform across all environments. What good
offered solution do if it features an option not supported by your
language or application?
- No high-level overview of the problem/task was given. As great as
regexes are they can't do everything. Sometimes there are better,
simpler solutions not involving regexes. Some problems can't be solved
I need a regex that matches a string containing only the letters of the
english alphabet, upper and lower case, and digits. I'm trying to
_________. I'm working with/in ___________. For this input __________
these values should match ___, ____, ___, These values should not ___,
"In theory, theory and practice are the same. In practice, they are not."