regex
美
英 
例句
The mode parameter that each of the four regex functions accepts should be a string of up to three characters, out of four possible modes.
四個regex函數中的每個函數可以接受的模式參數都應該是一個最多三個字符的字符串,且不屬于四種可能的模式。
It turns out that this smokes the regex competition when there is only a bit of whitespace on the ends of the string.
當字符串末尾只有少量空格時,這種情況使正則表達式陷入瘋狂工作。
It should be pretty easy to construct a decent regex now that we've got the structure and special characters down.
在我們了解了它的結構和特殊字符之后,產生一個合適的正則表達式應該就很容易了。
The key to preventing this kind of problem is to make sure that two parts of a regex cannot match the same part of a string.
預防此類問題的關鍵是確保正則表達式的兩個部分不能對字符串的同一部分進行匹配。
When a regex is put to use, the first step is to determine the position within the target string where the search should start.
當一個正則表達式投入使用時,首先要確定目標字符串中開始搜索的位置。
Each time the regex makes such a decision, it remembers the other options to return to later if necessary.
每當正則表達式做出這樣的決定,如果有必要的話,它會記住另一個選項,以備將來返回后使用。
Users of your regex will be able to easily understand and modify the pattern to meet their needs.
你的正則的使用者可以方便地明白和修改以達到他們的需求。
The leading and trailing slash shown in the code simply indicate the start and end of the regex.
代碼中的首尾斜杠只表示regex的開頭和結尾。
Because of the outer loop, the regex essentially advances right to left looking for a digit followed by three digits and a word boundary.
由于是外部循環,因此regex實質上將從右向左前進查找后接三位數和詞界的一位數。
The Regex class contains several static methods that allow you to use a regular expression without explicitly creating a Regex object.
Regex類包含若干靜態方法,使您無需顯式創建Regex對象即可使用正則表達式。
Because of the outer loop, the regex essentially advances right to left looking for a digit followed by three digits and a word boundary.
由于是外部循環,因此regex實質上將從右向左前進查找后接三位數和詞界的一位數。
The Regex class contains several static methods that allow you to use a regular expression without explicitly creating a Regex object.
Regex類包含若干靜態方法,使您無需顯式創建Regex對象即可使用正則表達式。
Just put the word regex in brackets ([]) before a string to create a regular expression.
只需要把regex放在中括號里,然后放在一個字符串的前面就可以創建一個正則表達式了。
Each time the regex finds an intermediate tag and exits a lookahead, it throws away all backtracking positions from within the lookahead.
正則表達式每次找到一個中間標簽就退出一個前瞻,它在前瞻過程中丟棄所有回溯位置。
To validate such a user name, say, in a Web form submitted to your server, you might use a regex such as ^[A-Za-z].
假定要在提交給您的服務器的Web表格中驗證這樣的用戶名,可以使用類似于^[A-Za-z]的regex。
We can now see that our regex has turned into a simple "program" that will be executed later.
可以看到,正則表達式已經被轉化為一個稍后可供運行的簡單“程序”。
In programming, a regular expression is written in a formal language, also known as regex or regexp.
在編程中,正則表達式是用一種形式語言編寫的,也稱為regex或regexp。
The Test Rule section of the RegEx editor, which is shown in Figure 6, is used to test your rule on a set of sample text snippets.
使用RegEx編輯器的TestRule部分(見圖6)在一組示例文本片段上測試規則。
A new filler element contains portions of the regex that are not in a group (that is, they do not generate XML tags).
一個新的filler元素包含不屬于組的那部分正則表達式(即不生成XML標簽)。
Other switches allow you to limit indexing to only add files whose name matches a pattern (either regex or glob).
其它開關允許您將索引限于只添加其名稱與模式(regex或glob)匹配的文件。
This is similar to the last regex, but it replaces the lazy quantifier with a greedy one for performance reasons.
這個表達式與上一個很像,但出于性能原因以貪婪量詞取代了懶惰量詞。
Some people go overboard, using regex caching schemes that aim to avoid ever compiling a given pattern and flag combination more than once.
有人做的太過火,使用正則表達式緩存池,以避免對給定的模板和標記組合進行多次編譯。
Consult references on those APIs for the hairy details, as they may be subtly different than the regex support in your language of choice.
參考這些API的文檔來獲取詳細信息,不同語言之間可能會存在微妙的差別。
That's because looping over characters to check whether they are whitespace can't match the efficiency of a regex's optimized search code.
因為循環檢查字符是不是空格在效率上不如正則表達式所使用的優化過的搜索代碼。
Given a regex and a datum, a regex engine yields whether the datum matches a pattern and, if a match was found, what matched.
給定一個正則表達式和數據,正則表達式引擎將得到數據是否匹配模式及匹配內容(如果找到匹配)等結果。
This attribute must be a regular expression that works with the Regex class.
該屬性必須是可用于Regex類的正則表達式。
Techniques like content-based filters (XPath or Regex) can then be used to selectively apply policies to particular messages.
然后,可以使用諸如基于內容的篩選(XPath或者Regex)之類的技術,以便有選擇地將這些策略應用于特定的消息。
However, this proved too complex with long regexes (it was difficult to decide how the group elements related to the regex).
但是,實踐證明對于很長的正則表達式這樣太復雜了(很難確定group元素與正則表達式的關系)。
Using a concise shorthand, regexes describe the form of data and decompose it.
使用簡明的簡寫方式,regex說明了數據的格式并分解數據。
For a full description of POSIX regular expressions see the regex man pages included in the regex directory in the PHP distribution.
POSIX正則表達式完整的描述見包含在PHP發行包中regex目錄下的man頁面。
Techniques like content-based filters (XPath or Regex) can then be used to selectively apply policies to particular messages.
然后,可以使用諸如基于內容的篩選(XPath或者Regex)之類的技術,以便有選擇地將這些策略應用于特定的消息。
However, this proved too complex with long regexes (it was difficult to decide how the group elements related to the regex).
但是,實踐證明對于很長的正則表達式這樣太復雜了(很難確定group元素與正則表達式的關系)。
Using a concise shorthand, regexes describe the form of data and decompose it.
使用簡明的簡寫方式,regex說明了數據的格式并分解數據。
For a full description of POSIX regular expressions see the regex man pages included in the regex directory in the PHP distribution.
POSIX正則表達式完整的描述見包含在PHP發行包中regex目錄下的man頁面。
The following code example creates an instance of the Regex class and defines a simple regular expression when the object is initialized.
下面的代碼示例創建了Regex類的實例并在初始化對象時定義一個簡單的正則表達式。
Indicates whether the regular expression specified in the Regex constructor finds a match in the input string.
指示Regex構造函數中指定的正則表達式在輸入字符串中是否找到匹配項。
Here, the regex is simply , (a comma, the eponymous delimiter of a comma-separated list).
在這里,regex只是,(一個逗號,以逗號分隔的列表中的分隔符)。
Just keep in mind that you need to use the appropriate back reference number if your regex contains more than one capturing group.
只要記住,你需要使用適當的后向引用次數如果你的正則表達式包含多個捕獲組。
If the specified mode is incorrect, any of the regex functions will return an error.
如果指定的模式不正確,所有regex函數都將返回錯誤。
If your input spans multiple lines, a typical regex won't suffice because scanning terminates at a newline, denoted by $.
如果輸入跨度多行,則使用典型的regex是不夠的,因為掃描將在$所指示的換行符處終止。