ezryder
05-07-2005, 05:50 AM
I have some code:
$logtext = "Inone4u: folds
Returned uncalled bets 670 to jumbo60
jumbo60: doesn't show hand";
($scrap, $ST_uncalledbets,$ST_returnedto) = ($logtext =~ /(.*)Returned uncalled bets (\d+) to (\w+)/);
What I then do is I use the variable $ST_returnedto to compare to another variable which also holds the value "jumbo60"
All of the above works fine. However I need the code to handle a value for $ST_returnedto which includes spaces (e.g. jumbo60 might be jumbo 60)
So I have modified my RE to:
($scrap, $ST_uncalledbets,$ST_returnedto) = ($logtext =~ /(.*)Returned uncalled bets (\d+) to (.*)/);
If I run this script the variable $ST_returnedto seems to be populated correctly but if I then compare $ST_returnedto to the other variable which also holds the value "jumbo60" the result is that they are not equal.
I dont understand why. Can anyone help please?
Thanks in advance.
$logtext = "Inone4u: folds
Returned uncalled bets 670 to jumbo60
jumbo60: doesn't show hand";
($scrap, $ST_uncalledbets,$ST_returnedto) = ($logtext =~ /(.*)Returned uncalled bets (\d+) to (\w+)/);
What I then do is I use the variable $ST_returnedto to compare to another variable which also holds the value "jumbo60"
All of the above works fine. However I need the code to handle a value for $ST_returnedto which includes spaces (e.g. jumbo60 might be jumbo 60)
So I have modified my RE to:
($scrap, $ST_uncalledbets,$ST_returnedto) = ($logtext =~ /(.*)Returned uncalled bets (\d+) to (.*)/);
If I run this script the variable $ST_returnedto seems to be populated correctly but if I then compare $ST_returnedto to the other variable which also holds the value "jumbo60" the result is that they are not equal.
I dont understand why. Can anyone help please?
Thanks in advance.