codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Perl Scripting Strings  sagarbsa at 03:47 on Tuesday, April 29, 2008
 

Hai,

I have strings as follows.

0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF 'SYS_C0030166' (INDEX (UNIQUE))


1 INDEX MODE: ANALYZED (UNIQUE SCAN) OF 'SYS_C0029845' (INDEX (UNIQUE)


9 INDEX MODE: ANALYZED (RANGE SCAN) OF 'BR_RELATED_PARTY_DETAILS_IDX1' (INDEX)


5 INDEX MODE: ANALYZED (RANGE SCAN) OF 'IM_ASSET_HOLDING_IDX2' (INDEX)


I have to extract what is present inside the single Quotes ie, i have to extract only 'SYS_C0030166', 'SYS_C0029845', 'BR_RELATED_PARTY_DETAILS_IDX1', 'IM_ASSET_HOLDING_IDX2' . I am new to perl. How do I do this in perl?
Thanks in Advance.

  Re: Perl Scripting Strings  mimir at 16:30 on Tuesday, April 29, 2008
 

$the_string = " 0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF 'SYS_C0030166' (INDEX (UNIQUE))";

my @content_within_the_quotes = map { /'([^']*)'/gi } $the_string;

print STDOUT "$content_within_the_quotes[0]";












CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  help - sketch
•  Re: Perl Script - File Handling.
•  Open a file from website
•  Re: to open 5 terminals from one and also execute different commands on each terminal
•  read a selected multiple line, those should match some of the values read in the files..
•  Help me please
•  Empty the contents of a file.
•  Month Start, End dates
•  show hide problem in dynamic table creation


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008