Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Flex regular expressions

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly shows you "how to use Flex regular expressions", the content is simple and easy to understand, clear organization, I hope to help you solve doubts, let Xiaobian lead you to study and learn "how to use Flex regular expressions" this article bar.

Flex regular expression learning

In general, the implementation of Flex regular expressions in different development environments or languages is not exactly the same, but the differences are very subtle. AS3 in accordance with ECMA262 standard Flex regular expressions, feel help documentation on this part of the introduction is not very good, many concepts are not clear, here found a good learning materials, if there are help documentation can not understand the reference!

demystifying Flex regular expressions Close highlighting

Flex regular expressions describe a feature in terms of a string and then verify that another string matches that feature. For example, if the expression "ab+" describes the characteristic "an 'a' and any 'b'," then'ab','abb',' abbbbbbb 'all satisfy this characteristic.

Flex regular expressions can be used to:

(1) Verify that the string matches specified characteristics, such as verifying that it is a valid email address.

(2) It is used to find character strings. It is more flexible and convenient to find character strings that meet specified characteristics from a long text than to find fixed character strings.

(3) Used as a replacement, more powerful than ordinary replacement.

Flex regular expressions are actually very simple to learn, and a few more abstract concepts are easy to understand. The reason why many people feel that Flex regular expressions are more complex is because most documents are not made up of

Shallow and in-depth explanation, the concept does not pay attention to the order, to the reader's understanding of difficulties; on the other hand, various engine comes with the document generally to introduce its unique functions, but this part of the unique function is not ours

First to understand.

Each example in the article can be clicked to enter the test page for testing. Let's cut to the chase and begin.

Flex regular expression rules

ordinary character

Letters, numbers, Chinese characters, underscores, and punctuation marks that are not specifically defined in subsequent chapters are all "ordinary characters." An ordinary character in an expression that matches a string with the same character.

Example 1: Expression "c", when matching the string "abcde", the matching result is: success; the matching content is: "c"; the matching position is: starting at 2 and ending at 3. (Note: Whether subscripts start from 0 or 1 may vary depending on the current programming language)

The above is "Flex regular expression how to use" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report