• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# Regular Expression Problem (perl)

## Recommended Posts

OK, not game programming I know, but im having some trouble with this regexp in Perl. Basically what I want it to do is to substitute every ''a'' in a variable with a ''b''. Except that it should ignore all the ''a''s inbetween < and > (html tags). Here''s what i''ve already tried, but it makes some weird results!
 ` \$page =~ s/(\>.*?)(a)(.*\
I''ve tried loads of different combinations, but nothing seems to work correctly! Any help appreciated, I''ve been trying for the past 2 days to get this working!

##### Share on other sites
Oh. Nevermind. I just got it working.

• ### Forum Statistics

• Total Topics
627701
• Total Posts
2978709

• 21
• 14
• 12
• 10
• 12