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

What are the properties and methods of regular expressions in Flex programming

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

Share

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

This article mainly introduces the attributes and methods of regular expressions in Flex programming. It is very detailed and has a certain reference value. Friends who are interested must read it!

Flex programming-- regular expression

The RegExp class allows the use of regular expressions (that is, patterns that can be used to search for and replace text in strings).

You can create a new RegExp object by using the newRegExp () constructor or by assigning RegExp text to a variable:

Varpattern1:RegExp=newRegExp ("test-\\ d", "I")

Varpattern2:RegExp=/test-\ dplani

Common attributes of regular expressions in Flex programming

Attribute definition party

Constructor:Object

A reference to the constructor of a class object or a given object instance. Object

Dotall:Boolean

◆ specifies the dot character (.) in the regular expression pattern. Whether it matches the newline character. RegExp

Extended:Boolean

◆ specifies whether to use extended mode for regular expressions. RegExp

Global:Boolean

◆ specifies whether global matching is used for regular expressions. RegExp

IgnoreCase:Boolean

◆ specifies whether the regular expression ignores case. RegExp

LastIndex:Number

Specifies the index position in the string to start the next search. RegExp

Multiline:Boolean

◆ specifies whether the m (multiline) flag is set. RegExp

Prototype:Object

◆ 's reference to the prototype object of a class or function object. Object

Source:String

◆ specifies the pattern portion of the regular expression. RegExp

Common methods of regular expressions in Flex programming

Method definition square

◆ RegExp (re:String,flags:String)

Allows you to use two strings to construct regular expressions. RegExp

◆ exec (str:String): Object

Performs a regular expression search in the given string str. RegExp

◆ hasOwnProperty (name:String): Boolean

Indicates whether the specified property has been defined for the object. Object

◆ isPrototypeOf (theClass:Object): Boolean

Indicates whether an instance of the Object class is in the prototype chain of the object specified as a parameter. Object

◆ propertyIsEnumerable (name:String): Boolean

Indicates whether the specified property exists and can be enumerated. Object

◆ setPropertyIsEnumerable (name:String,isEnum:Boolean=true): void

Sets the availability of the dynamic properties of the loop operation. Object

◆ test (str:String): Boolean

Tests whether the regular expression matches in the given string str. RegExp

These are all the contents of the article "what are the properties and methods of regular expressions in Flex programming?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow 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