Search Results

Search: Posts Made By: DavidHe
1,831
Posted By DavidHe
Ta Thank u so much!!!!!!!!!!!!!!!!!!!!
Ta
Thank u so much!!!!!!!!!!!!!!!!!!!!
1,831
Posted By DavidHe
Regular Expressions
what elements does " /^[^A-Z]/ " match?

I did the test which indicates that it matches single lowercase character like 'a','b' etc. and '1','2' etc.

But I really confused with that. Because,...
4,233
Posted By DavidHe
Thank you very much. Second, it's all there....
Thank you very much.
Second, it's all there. Regex, by default, match, but do not save what is matched. If you want to save the matches (extract them), you'll have to explicitly tell the state...
4,233
Posted By DavidHe
Thank u for your reply.... But doesn`t anything...
Thank u for your reply.... But doesn`t anything match the pattern should be stored in $1,$2...$n???? U said it is matched but not stored in the $2 because it is not enclsoed within bracket....So what...
4,233
Posted By DavidHe
Hi thank u for your reply. I juz get confused...
Hi thank u for your reply. I juz get confused that why ".*\s" does not match "last " Thank you
note that there is a whitespace after double-quoted last

---------- Post updated at 09:18 AM...
4,233
Posted By DavidHe
Regular Expressions
#!/usr/bin/perl


$word = "one last challenge";


if ( $word =~ /^(\w+).*\s(\w+)$/ )
{
print "$1";
print "\n";
print "$2";

}
The output shows that "$1" is with result one and "$2"...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 06:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy