Hi All,
I have a string which reads
$str5 = " DL_FEM_ADJ1 = DL_FEM_LINE_FIRST, /* Keep the adjacent ones
consecutive */";
Here i need to consider the variable and its value, ignoring the comment.
I have a pattern which reads
if($str5 =~ /\s*([A-Z_]+)\s=\s(\w+),*/) {
print "$1 and $2\n";
}
The above works, if the string is " DL_FEM_SCREEN_ADJ1 =
DL_FEM_SCREEN_NO_SECOND_LINE_FIRST," (without the comments)
I am unable to come up with a pattern which would ignore the comment and
gives me the substrings which i want. I need to read DL_FEM_SCREEN_ADJ1 and
DL_FEM_SCREEN_NO_SECOND_LINE_FIRST only.
The input string can either occur with comments or without comments, since
the input keeps changing. The input provided here is a sample input.
Can anyone please guide me in this?
Thanks and Regards,
Dharshana