>> English << | česky | Deutsch | Español ZVON > Tutorials > Regular Expressions Tutorial
>> Example 19 << | Prev | Next | Contents | Regular Expressions

Description


\W matches any non-word character (everything but alphanumeric plus "_" ). Compare Case 1 and Case 2. It is equivalent to "[^A-z0-9_]".

Source


AS _34:AS11.23  @#$ %12^*

Case 1


Regular Expression: \W
First match:AS _34:AS11.23 @#$ %12^*
All matches:AS _34:AS11.23 @#$ %12^*

Case 2


Regular Expression: \w
First match:AS _34:AS11.23 @#$ %12^*
All matches:AS _34:AS11.23 @#$ %12^*

Case 3


Regular Expression: [^A-z0-9_]
First match:AS _34:AS11.23 @#$ %12^*
All matches:AS _34:AS11.23 @#$ %12^*