English 中文(简体)
RegEx / Computer theory - Construction areg 按字母顺序排列
原标题:RegEx / computer theory - construct a regEx in alphabetical order
  • 时间:2011-10-05 21:15:17
  •  标签:
  • regex
  • theory

在我的图表中——计算机理论类——我试图以字母顺序经常表达(a-z)

l = {a, b, x, y, z, i, o, u, e, c}

这就是使用ene门封闭装置所引发的。

aeiou(x*, y*, z*, i*, o*, u* e*) 

k子关闭后 * 零或更多,因此应强制使用乙氧?

We have not been learning this type of form

[^abc]

是否正确?

最佳回答

根据我的理解,你希望以以下格式抓住插图:

  • The string contains any number of a s, afterwards any number of b s, then any number of c s, and so on...

让我们考虑一个衍生的例子: 我们想到所有星号,包括<代码>0和1,且有<代码>0。 在<代码>1之前: 因此,我们只能书写<代码>0*1*。 现在试图使甲型字母更加复杂。

问题回答

the word must be in alphabetical order, so if it contains any a s, they surely must be at the front. likewise, if it contains any b s , they must come after the a s, and nothing can come in between the a s and b s

页: 1

因此出现了一种模式。





相关问题
Uncommon regular expressions [closed]

Recently I discovered two amazing regular expression features: ?: and ?!. I was curious of other neat regex features. So maybe you would like to share some tricky regular expressions.

regex to trap img tag, both versions

I need to remove image tags from text, so both versions of the tag: <img src="" ... ></img> <img src="" ... />

C++, Boost regex, replace value function of matched value?

Specifically, I have an array of strings called val, and want to replace all instances of "%{n}%" in the input with val[n]. More generally, I want the replace value to be a function of the match ...

PowerShell -match operator and multiple groups

I have the following log entry that I am processing in PowerShell I m trying to extract all the activity names and durations using the -match operator but I am only getting one match group back. I m ...

Is it possible to negate a regular expression search?

I m building a lexical analysis engine in c#. For the most part it is done and works quite well. One of the features of my lexer is that it allows any user to input their own regular expressions. This ...

regex for four-digit numbers (or "default")

I need a regex for four-digit numbers separated by comma ("default" can also be a value). Examples: 6755 3452,8767,9865,8766,3454 7678,9876 1234,9867,6876,9865 default Note: "default" ...

热门标签