473,385 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

limit character occurrences in a regex character set but allow random ordering

Im trying to do a regular expression that only gets letters in a certain character set '^[abcd]+$ but i want to not get words like badd or cabb and only cab or bad so that each character in the character set is only used once or the number of time used in that character set? i dont know if this will be possible because i may have multiple occurences of the same character in one chracter set


Not to complicate this but that is only the first part what i really want to do is also allow one wildcard to occur within that character set but limit it to occurring x number of times while allowing random ordering of the character set still. I tried was going to do a '^[abcd]+.[0,1}$ but the random ordering isnt working at all only on the exteriors of the expression do i find it possible. Does anyone know how to find a solution?
Sep 3 '12 #1
1 2438
zmbd
5,501 Expert Mod 4TB
Please:
- Show you your work... that is what code have you tried.
- Only one question per thread.
-z
Sep 12 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Bill | last post by:
Dear All, I have a question related to character set. The default encoding of MySQL is latin1. So, textual data should be interpreted as 8-bit character. Is that right? If the default...
2
by: Daz | last post by:
Hi everyone. I am looking to create a simple function that will spot a hexcolor in a font tag, that has quotes, and remove the quotes. i.e <font color="ffffff"should become <font color=ffffff>. ...
0
by: trashman.horlicks | last post by:
Hi all, More regex questions, sadly ;) If I had a string that could contain any combination, or some/none of .+-*/ how could I strip off extraneous characters after any of these characters to...
0
by: rajap | last post by:
The scenario is, when I do search on google site it throws several links. The Test script has to pick up the hyperlinks randomly. I tried, but unable to define exactly. I gave ‘testing’ as search...
5
by: herman | last post by:
How can I replace all occurrences of a character with another character in std string? For example, I want to replace '/' with '+' in my std::string I have looked at the replace() method in...
3
by: alessio211734 | last post by:
How can I check in c++ string if a character is lower or upper? Exist a function in c++ to convert string to upper characters? Thanks in advance.
2
by: George2 | last post by:
Hello everyone, I need to know the wide character (unicode) and multibyte (UTF-8) values of a character string of czech. I personally know nothing about czech. Is the following approach correct?...
2
by: christopher taylor | last post by:
hello python-list! the other day, i was trying to match unicode character sequences that looked like this: \\uAD0X... my issue, is that the pattern i used was returning:
0
by: christopher taylor | last post by:
My apologies to the respondents - I failed to screen my test cases before kicking them out to the global python-list. but yes, the 'X' character in my test case was a mistake on my part. I'll give...
3
by: Petimus | last post by:
Nowhere can I find the beginning of line Character for Regex in C#. Im using the expression *(, *)*$ But without the <Beginning of line>*(, *)*$ my strings are accepted with random letters in them...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.