473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

what does /^[^ ]/ mean in perl?

what does /^[^ ]/ mean in perl?
Nov 4 '10 #1
1 3250
toolic
70 Expert
It is a regular expression which matches any non-space character at the beginning of a string.

perlre

YAPE::Regex::Explain

Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use warnings;
  3.  
  4. use YAPE::Regex::Explain;
  5. print YAPE::Regex::Explain->new(qr/^[^ ]/)->explain();
  6.  
  7. __END__
  8.  
  9. The regular expression:
  10.  
  11. (?-imsx:^[^ ])
  12.  
  13. matches as follows:
  14.  
  15. NODE                     EXPLANATION
  16. ----------------------------------------------------------------------
  17. (?-imsx:                 group, but do not capture (case-sensitive)
  18.                          (with ^ and $ matching normally) (with . not
  19.                          matching \n) (matching whitespace and #
  20.                          normally):
  21. ----------------------------------------------------------------------
  22.   ^                        the beginning of the string
  23. ----------------------------------------------------------------------
  24.   [^ ]                     any character except: ' '
  25. ----------------------------------------------------------------------
  26. )                        end of grouping
  27. ----------------------------------------------------------------------
Nov 4 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Charles Hixson | last post by:
I'm getting a list that I build which when printed is displaying, well, e.g.: d = << , 'Do', 'not', 'remove', 'thi', '.', ] >> Clearly I have a problem with the truncation of the final this, but...
4
by: QQ | last post by:
for example ~CcMessage() {} Thanks a lot! I am a beginner for C++, so please forgive my stupid questions
6
by: wintaki | last post by:
Given int x; What does x evaluate to? If x is 0, it equals 0x31, the ascii value of '1'. So for some reason, x evaluates to *(y+x) where x is a non pointer/array type.
1
by: alex14 | last post by:
Hi could someone please tell me what the double colons :: in perl scripts mean and what do they do? kind regards alex
2
by: SMichal | last post by:
Hi, I'm starting from my application simple bat data...test.bat. This file (test.bat) should start another aplication app.exe. I'm starting the test.bat from my application with Start() method of...
9
by: plusk1008 | last post by:
I have finals next week and I am stuck on one question on my review sheet for excel. So once again I beg: Please, please, please, please, please, please, please, please, please, please someone help...
2
by: mantrid | last post by:
in some php script ive seen $something==@$somethingelse whereas something==$somethingelse works the same what does the use of the @ do? Sorry if this is a stupid question
0
by: hini | last post by:
Hello, I see the N' in many asp , sql scripts at the beginning of a string usually and I don't know what's its meaning, I could not find anything about it when seraching google because of the...
1
by: baskarpr | last post by:
Hi. Can anyone tell the purpose/meaning of ":=" which is used in VBA ? It sounds like a smiley, lol. Example : ActiveWorkbook.Sheets("Sheet1").Copy after:=ActiveWorkbook.Sheets ("Sheet1") ...
1
by: Daniel Brower | last post by:
I found documentation that uses the ^ notation after a type name. What does that notation mean? Daniel
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.